Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27715

Creator allows creating uncompilable project

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: Qt Creator 7.0.2
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Windows

      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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              cadam Cristian Adam
              Reporter:
              anmaatta Antti Määttä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes