From 1ad8560c9b97af9e4d80d21d6e45c3c4cd4dc2fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= Date: Sun, 23 Aug 2020 11:47:59 -0400 Subject: Suppress deprecation warnings from Qt Starting from Qt 5.13, QT_DEPRECATED_WARNINGS is now enabled by default. Unfortunately, methods are often deprecated not long after a suitable alternative is available, meaning that getting rid of these warnings would require breaking backwards compatibility (or sprinkling QT_VERSION checks everywhere). (See QList::fromStdList() as an example, which was marked as deprecated merely a month after range constructors were made available.) This reverts things to how they were before. Getting rid of these warnings will probably be part of the job when porting to Qt 6. --- src/gui/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 85d50ee..aeff39b 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1,5 +1,9 @@ project(twinkle-gui) +# Suppress deprecation warnings from Qt, as they often would require breaking +# backwards compatibility. +add_definitions(-DQT_NO_DEPRECATED_WARNINGS) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -- cgit v1.2.3