aboutsummaryrefslogtreecommitdiffstats
path: root/.cmake.conf
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-08-06 17:03:37 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-08-17 18:04:35 +0200
commit8edbcdbeb49630c207f3111d24b9c9e07029e333 (patch)
treeb1c6f0a88c19f69126e6915cdefab81c44fdab06 /.cmake.conf
parent2ed0abd5533750343a382f5b4ab5dcab6d52eff2 (diff)
Mark the module as free of Q_FOREACH, except where it isn't
The density of Q_FOREACH uses is high here, too high for this author, unfamiliar with this code, to tackle in a short amount of time. But they're concentrated in just a few TUs, so pick a different strategy: Mark the whole module with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). Created QTBUG-115808 to keep track of this. Task-number: QTBUG-115808 Change-Id: I29c377f939e3d747e3ce72c224c4ee722df7a95d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to '.cmake.conf')
-rw-r--r--.cmake.conf1
1 files changed, 1 insertions, 0 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 8b5401f057..d4121fee8d 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -3,3 +3,4 @@ set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1")
set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_LEAN_HEADERS=1")
list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
+list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1")