From 6b229c3ae2b501437fff79f65ff0ffeb3d786a2d Mon Sep 17 00:00:00 2001 From: Albert Astals Cid <aacid@kde.org> Date: Thu, 23 Jan 2020 17:18:46 +0100 Subject: [PATCH] Add QT_STRICT_ITERATORS --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8937eac..ed6ef08f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,6 +107,14 @@ add_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_USE_QSTRINGBUILDER -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT) +if (NOT WIN32) + # Strict iterators can't be used on Windows, they lead to a link error + # when application code iterates over a QVector<QPoint> for instance, unless + # Qt itself was also built with strict iterators. + # See example at https://bugreports.qt.io/browse/AUTOSUITE-946 + add_definitions(-DQT_STRICT_ITERATORS) +endif() + include_directories("include/QtCrypto/") # for generated files include_directories(${CMAKE_BINARY_DIR})