diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-11-13 17:14:43 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-01 07:39:55 +0000 |
commit | ef05c48898e90e4ff40d8c4493f4b80bc22c1703 (patch) | |
tree | e568f3d1a746d89e44a306d6e201f2adafde77a9 /mkspecs/features/qt_common.prf | |
parent | 869459f3c83eeeb404105ea656e1220c3de489e6 (diff) |
Fix -Wdeprecated-copy warnings
Implicit copy constructors or methods are considered deprecated for
classes that has one of the two or a destructor.
The warning is enabled with -Wextra in gcc 9
Change-Id: Ic9be654f2a142fb186a4d5a7d6b4f7d6f4e611d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'mkspecs/features/qt_common.prf')
-rw-r--r-- | mkspecs/features/qt_common.prf | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index 004b32fd22..843916b3b1 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -90,14 +90,8 @@ clang { greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond # GCC 7 has a lot of false positives relating to this, so disable completely greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow - # GCC 9 has a lot of false positives relating to this, so disable completely - greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy - # GCC 9 introduced this - greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move - # GCC 9 introduced this + # GCC 9 introduced -Wformat-overflow in -Wall, but it is buggy: greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow - # GCC 9 introduced this - greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime } warnings_are_errors:warning_clean { @@ -137,14 +131,13 @@ warnings_are_errors:warning_clean { # GCC 7 includes -Wimplicit-fallthrough in -Wextra, but Qt is not yet free of implicit fallthroughs. greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=implicit-fallthrough - # GCC 9 has a lot of false positives relating to this, so disable completely - greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy + # GCC 9 introduced -Wdeprecated-copy in -Wextra, but we are not clean for it. + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=deprecated-copy # GCC 9 introduced this - greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=redundant-move # GCC 9 introduced this - greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow - # GCC 9 introduced this - greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime + greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=init-list-lifetime + # Work-around for bug https://code.google.com/p/android/issues/detail?id=58135 android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix } |