Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-462

Qt5 VS Tools is no longer creating moc build steps

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 2.1.2
    • 2.1.1
    • General
    • Qt5.6.2, VS2015, using PCH.
    • af5dcc0ac037b902c6ce87fca7f71bdaeab96e41

    Description

      Saving a header file containing the "Q_OBJECT" macro to the project does not result in valid moc steps being generated for the file.

      Adding an existing header file containing the "Q_OBJECT" macro to the project does not result in any moc_XXX.cpp files being added to the project, or any moc steps being generated for the file.

      The linker then fails with missing implementations for QMetaObject etc.

      I tried the old workaround of commenting out Q_OBJECT saving, uncommenting and then resaving.

      This resulted in the "moc_MyObject.cpp" files being added to the vcxproj, but the actual moc "CustomBuild" steps were not added and so it could not be compiled.

      I am not aware of any other methods of forcing the add-in to rescan the header file.

      Attachments

        Issue Links

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

          Activity

            People

              mecfc Miguel Costa
              rthompson Richard Thompson
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes