GCC 5 is able to warn about missing override keyword.

This commit is contained in:
Mathew Sutcliffe
2016-01-27 23:33:21 +00:00
parent 19dd72cf3e
commit a88f5e33e3

View File

@@ -12,3 +12,12 @@ win32-msvc*:QMAKE_CXXFLAGS_WARN_ON *= /wd4351 /wd4661
# noisy warning in std <functional> header of MSVC2015 (QTBUG-50108)
win32-msvc2015:QMAKE_CXXFLAGS_WARN_ON -= -w34100
# gcc 5 can warn about missing override keyword
g++ {
GCC_VERSION = $$system($$QMAKE_CXX -dumpversion)
GCC_MAJOR = $$section(GCC_VERSION, ., 0, 0)
greaterThan(GCC_MAJOR, 4) {
QMAKE_CXXFLAGS_WARN_ON *= -Wsuggest-override
}
}