aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktextinput
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 /tests/auto/quick/qquicktextinput
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 'tests/auto/quick/qquicktextinput')
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 9a3c6efba3..0adb3fc8a0 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -1,5 +1,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
+
#include <qtest.h>
#include <QtTest/QSignalSpy>
#include <QtQuickTestUtils/private/qmlutils_p.h>