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

        1. q_object.png
          93 kB
          Nikos Chantziaras

        Issue Links

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

          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