Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-90804

Moc behaves weirdly on .cpp files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.1
    • Build tools: moc
    • None

    Description

      Running moc manually on a .cpp file produces "note: No relevant classes found. No output generated."

      This is visible on examples (e.g. examples/widgets/painting/affine) by running:

      ~/work/build/qt5/qtbase_moc/bin/moc -I <entries>... xform.cpp
      

      Note: -I entries are taken from the AutogenInfo.json file (see "MOC_INCLUDES") and since automoc seems to work fine, the expectation is that manual moc run should work fine as well.

      Similar behavior is seen with QML compiler's autogenerated file (this is how the initial issue was discovered), however, in this case the message is visible even with automoc. At the same time, I can see the "qt_metacall" and friends as symbols of the built binary (so despite "not finding any relevant class", some MOC code is still baked into the binary).

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            agolubev Andrei Golubev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes