aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles/qquickparticleaffector.cpp
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 16:04:22 +0000
commit2ed0abd5533750343a382f5b4ab5dcab6d52eff2 (patch)
tree2f9d10802047a684c244bf3cf3be5d7998b7dfcc /src/particles/qquickparticleaffector.cpp
parent055859f93f6f0090a456c813f5b4931b25172aea (diff)
Mark QtQuickParticles 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 library 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, and other such follow-up changes in this module. Task-number: QTBUG-115808 Change-Id: Ib8c285ed2030940e599b3dba675a352096fe9fad Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/particles/qquickparticleaffector.cpp')
-rw-r--r--src/particles/qquickparticleaffector.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/particles/qquickparticleaffector.cpp b/src/particles/qquickparticleaffector.cpp
index 17038f4593..bf28cffde6 100644
--- a/src/particles/qquickparticleaffector.cpp
+++ b/src/particles/qquickparticleaffector.cpp
@@ -1,6 +1,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
+
#include "qquickparticleaffector_p.h"
#include <QDebug>
#include <private/qqmlglobal_p.h>