summaryrefslogtreecommitdiffstats
path: root/tests/auto/dbus/qdbusmarshall
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/dbus/qdbusmarshall')
-rw-r--r--tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt2
-rw-r--r--tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt
index daad23cdf5..806bdfc181 100644
--- a/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt
+++ b/tests/auto/dbus/qdbusmarshall/qdbusmarshall/CMakeLists.txt
@@ -9,6 +9,8 @@ qt_internal_add_test(tst_qdbusmarshall
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../"
SOURCES
../tst_qdbusmarshall.cpp
+ NO_PCH_SOURCES
+ ../tst_qdbusmarshall.cpp # undef QT_NO_FOREACH
LIBRARIES
Qt::CorePrivate
Qt::DBusPrivate
diff --git a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
index fc372c7c9c..20eff845c9 100644
--- a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
+++ b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
@@ -1,6 +1,9 @@
// Copyright (C) 2016 The Qt Company Ltd.
// Copyright (C) 2016 Intel Corporation.
// 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 <QtCore/QtCore>
#include <QTest>
#include <QTestEventLoop>