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

Automoc "No relevant classes found" for conditional Q_OBJECT in cpp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4: Low P4: Low
    • None
    • Qt Creator 15.0.0
    • Building Qt Creator
    • None
    • f95d904d0 (master)

      Building Qt Creator in release mode prints many warnings such as:

      AutoMoc: src/plugins/qtsupport/qtparser.cpp: note: No relevant classes found. No output generated.

      These files have Q_OBJECT inside #ifdef WITH_TESTS, so I guess automoc detects it as moc candidate, and moc warns because it finds no classes.

      Is it possible to improve automoc to consider conditionals? If this is too hard, maybe you could add a flag for moc that suppresses this warning?

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

            orgads Orgad Shaneh
            orgads Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes