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

Moc behaves weirdly on .cpp files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Invalid
    • Affects Version/s: 6.1
    • Fix Version/s: None
    • Component/s: Build tools: moc
    • Labels:
      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

            Assignee:
            fabiankosmale Fabian Kosmale
            Reporter:
            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