Qt 5.5.0 officially released on July 1st. But on OS X, for example 10.10.4+Xcode 6.4(clang-602.0.53), you will have lots of warnings about ‘-Winconsistent-missing-override’, like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
In file included from moc_widget.cpp:9: In file included from ./../qt55test/widget.h:4: In file included from ../../QtSDK/5.5/clang_64/lib/QtWidgets.framework/Headers/QWidget:1: In file included from ../../QtSDK/5.5/clang_64/lib/QtWidgets.framework/Headers/qwidget.h:38: /Users/liangqi/QtSDK/5.5/clang_64/lib/QtCore.framework/Headers/qobject.h:108:5: warning: unknown warning group '-Winconsistent-missing-override', ignored [-Wunknown-pragmas] Q_OBJECT ^ /Users/liangqi/QtSDK/5.5/clang_64/lib/QtCore.framework/Headers/qobjectdefs.h:156:5: note: expanded from macro 'Q_OBJECT' Q_OBJECT_NO_OVERRIDE_WARNING \ ^ /Users/liangqi/QtSDK/5.5/clang_64/lib/QtCore.framework/Headers/qobjectdefs.h:146:45: note: expanded from macro 'Q_OBJECT_NO_OVERRIDE_WARNING' # define Q_OBJECT_NO_OVERRIDE_WARNING QT_WARNING_DISABLE_CLANG("-Winconsistent-missing-override") ^ /Users/liangqi/QtSDK/5.5/clang_64/lib/QtCore.framework/Headers/qcompilerdetection.h:1125:49: note: expanded from macro 'QT_WARNING_DISABLE_CLANG' # define QT_WARNING_DISABLE_CLANG(text) QT_DO_PRAGMA(clang diagnostic ignored text) ^ /Users/liangqi/QtSDK/5.5/clang_64/lib/QtCore.framework/Headers/qcompilerdetection.h:1096:49: note: expanded from macro 'QT_DO_PRAGMA' #define QT_DO_PRAGMA(text) _Pragma(#text) ^ <scratch space>:28:27: note: expanded from here clang diagnostic ignored "-Winconsistent-missing-override" ^ |
Yes, there is a bug report(QTBUG-46833) for it. And the fix is in 7d5e849e.
The solution is:
1 2 3 4 |
cd ~/QtSDK/5.5/clang_64/lib/QtCore.framework/Headers cp qcompilerdetection.h qcompilerdetection.h.bak vi qcompilerdetection.h |
Go to Line 158, change 6020049 to 7000053. Save it!