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

Clang: Q_OBJECT generates override warnings (-Winconsistent-missing-override)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 4.4.0-rc1
    • Qt Creator 4.4.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Linux, GCC 6.3.0

    Description

      When using the Clang code model, the Q_OBJECT macro is underlined and a yellow warning icon is generated. See screenshot.

      Code to reproduce:

      #include <QObject>
      
      class Foo: public QObject {
          Q_OBJECT
      
      public:
          bool event(QEvent *event) override;
      };
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-18621
          # Subject Branch Project Status CR V

          Activity

            People

              kosjar Nikolai Kosjar
              realnc Nikos Chantziaras
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes