Quantcast
Channel: Qi Liang – Enjoy Life! – Liang Qi
Viewing all articles
Browse latest Browse all 104

Qt 5.5.0 on OS X: fix for ‘-Winconsistent-missing-override’ warning

$
0
0

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:

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:

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!


Viewing all articles
Browse latest Browse all 104

Trending Articles


“Tado” Jimenez Quotes Collections Online


Vimeo 10.7.1 by Vimeo.com, Inc.


Girasoles para colorear


tagalog love Quotes – Tiwala Quotes


EASY COME, EASY GO


5 Tagalog Relationship Rules


Hugot Lines 2020 Patama : ML Edition


Re:Mutton Pies (lleechef)


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE


Presence Quotes – Positive Quotes


Pokemon para colorear


Sapos para colorear


Maganda Quotes – tagalog Quotes – Inggit Quotes


Mga Patama sa mga Nagmamahal the Best Tagalog love quotes for you


Top 10 Best Tagalog Friendship Quotes and Sayings | mrbolero


“BAHAY KUBO HUGOT”


RE: Mutton Pies (frankie241)


Long Distance Relationship Tagalog Love Quotes


HOY PANGIT, MAGBAYAD KA!