Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 7.0.2
-
None
Description
When creating project with - in it's name creates compilation errors in generated source files.
C:\dev\projects\build-testQTBUG-38765-Desktop_Qt_6_2_4_MSVC2019_64bit-Debug\apptestqtbug-38765_qmltyperegistrations.cpp(17): error C2143: syntax error: missing ';' before '-' C:\dev\projects\build-testQTBUG-38765-Desktop_Qt_6_2_4_MSVC2019_64bit-Debug\apptestqtbug-38765_qmltyperegistrations.cpp(17): error C2182: 'qml_register_types_testQTBUG': this use of 'void' is not valid C:\dev\projects\build-testQTBUG-38765-Desktop_Qt_6_2_4_MSVC2019_64bit-Debug\apptestqtbug-38765_qmltyperegistrations.cpp(18): error C2143: syntax error: missing ';' before '{' C:\dev\projects\build-testQTBUG-38765-Desktop_Qt_6_2_4_MSVC2019_64bit-Debug\apptestqtbug-38765_qmltyperegistrations.cpp(18): error C2447: '{': missing function header (old-style formal list?) C:\dev\projects\build-testQTBUG-38765-Desktop_Qt_6_2_4_MSVC2019_64bit-Debug\apptestqtbug-38765_qmltyperegistrations.cpp(22): error C2664: 'QQmlModuleRegistration::QQmlModuleRegistration(const char *,void (__cdecl *)(void))': cannot convert argument 2 from 'int' to 'void (__cdecl *)(void)' C:\dev\projects\build-testQTBUG-38765-Desktop_Qt_6_2_4_MSVC2019_64bit-Debug\apptestqtbug-38765_qmltyperegistrations.cpp(22): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or parenthesized function-style cast
The source file contails - in a function name:
Q_QMLTYPE_EXPORT void qml_register_types_testQTBUG-38765()
{
qmlRegisterModule("testQTBUG-38765", 1, 0);
}
Attachments
Issue Links
- duplicates
-
QTBUG-101072 Choosing a project name with a dash inside creates a broken cmake configuration
- Open