summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-08-05 22:37:02 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-08-18 15:15:40 +0000
commit3386c44972e01384be6ac1e7f7b47d9f98681dd5 (patch)
tree6b5c12c93dda385bec82fafbbdc572f3e38aaca6 /tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
parentdd8268d5fbab092fbd936edb618d9d5b7546a431 (diff)
Mark the module as free of Q_FOREACH, except where it isn't
The density of Q_FOREACH uses is non-negligible here, too high for this author, still unfamiliar with this module, 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-115805 to keep track of this. Task-number: QTBUG-115805 Change-Id: I7a80b1820972687ccced24d9edd7a8f5b826556f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp')
-rw-r--r--tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
index a0f93faac..06654b337 100644
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
@@ -18,6 +18,9 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
+
#include <QtWebEngineCore/private/qtwebenginecore-config_p.h>
#include <qtest.h>
#include <util.h>