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

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

    XMLWordPrintable

Details

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

    Description

      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?

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes