diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 6d3eddcb96..043d2ca496 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -161,6 +161,7 @@ qt_internal_add_global_definition(QT_NO_QEXCHANGE) qt_internal_add_global_definition(QT_NO_NARROWING_CONVERSIONS_IN_CONNECT) qt_internal_add_global_definition(QT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH) qt_internal_add_global_definition(QT_USE_QSTRINGBUILDER SCOPE PLUGIN TOOL MODULE) +qt_internal_add_global_definition(QT_NO_FOREACH) if(WARNINGS_ARE_ERRORS) qt_internal_set_warnings_are_errors_flags(PlatformModuleInternal INTERFACE) diff --git a/src/corelib/doc/snippets/code/doc_src_containers.cpp b/src/corelib/doc/snippets/code/doc_src_containers.cpp index 5bcee95d32..b568462492 100644 --- a/src/corelib/doc/snippets/code/doc_src_containers.cpp +++ b/src/corelib/doc/snippets/code/doc_src_containers.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + //! [0] class Employee { diff --git a/src/corelib/doc/snippets/code/qlogging/qlogging.cpp b/src/corelib/doc/snippets/code/qlogging/qlogging.cpp index a841829600..e61eb70df3 100644 --- a/src/corelib/doc/snippets/code/qlogging/qlogging.cpp +++ b/src/corelib/doc/snippets/code/qlogging/qlogging.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + #include #include #include diff --git a/src/corelib/doc/snippets/code/src_corelib_io_qstorageinfo.cpp b/src/corelib/doc/snippets/code/src_corelib_io_qstorageinfo.cpp index d11368a83d..93029274b1 100644 --- a/src/corelib/doc/snippets/code/src_corelib_io_qstorageinfo.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_io_qstorageinfo.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2014 Ivan Komissarov // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + //! [0] QStorageInfo storage(qApp->applicationDirPath()); if (storage.isValid() && storage.isReady()) { diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp index 2a3a27e94b..b1198924c8 100644 --- a/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qcoreapplication.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + //! [0] QMouseEvent event(QEvent::MouseButtonPress, pos, 0, 0, 0); QApplication::sendEvent(mainWindow, &event); diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp index 36cbdefa1c..c6a48c8827 100644 --- a/src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + //! [0] void MyWidget::dragEnterEvent(QDragEnterEvent *event) { diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qvariant.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qvariant.cpp index dcae4b6934..7f3f1ce7a0 100644 --- a/src/corelib/doc/snippets/code/src_corelib_kernel_qvariant.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qvariant.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + //! [0] QDataStream out(...); QVariant v(123); // The variant now contains an int diff --git a/src/plugins/platforms/ios/CMakeLists.txt b/src/plugins/platforms/ios/CMakeLists.txt index 1085d41aa8..1c99103a49 100644 --- a/src/plugins/platforms/ios/CMakeLists.txt +++ b/src/plugins/platforms/ios/CMakeLists.txt @@ -33,8 +33,6 @@ qt_internal_add_plugin(QIOSIntegrationPlugin qiosintegration.mm # undef QT_NO_FOREACH qiosplatformaccessibility.mm # undef QT_NO_FOREACH qiosscreen.mm # undef QT_NO_FOREACH - DEFINES - QT_NO_FOREACH LIBRARIES ${FWAudioToolbox} ${FWFoundation} diff --git a/src/plugins/platforms/qnx/CMakeLists.txt b/src/plugins/platforms/qnx/CMakeLists.txt index 7c8b8c33e0..9fb412d8a4 100644 --- a/src/plugins/platforms/qnx/CMakeLists.txt +++ b/src/plugins/platforms/qnx/CMakeLists.txt @@ -37,8 +37,6 @@ qt_internal_add_plugin(QQnxIntegrationPlugin qqnxscreen.cpp # undef QT_NO_FOREACH qqnxscreeneventhandler.cpp # undef QT_NO_FOREACH qqnxwindow.cpp # undef QT_NO_FOREACH - DEFINES - QT_NO_FOREACH LIBRARIES Qt::Core Qt::CorePrivate diff --git a/src/plugins/platformthemes/gtk3/CMakeLists.txt b/src/plugins/platformthemes/gtk3/CMakeLists.txt index c9e4de6124..becfcccd35 100644 --- a/src/plugins/platformthemes/gtk3/CMakeLists.txt +++ b/src/plugins/platformthemes/gtk3/CMakeLists.txt @@ -27,7 +27,6 @@ qt_internal_add_plugin(QGtk3ThemePlugin qgtk3dialoghelpers.cpp # undef QT_NO_FOREACH DEFINES GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6 - QT_NO_FOREACH LIBRARIES PkgConfig::GTK3 Qt::Core diff --git a/tests/auto/concurrent/qtconcurrentmedian/tst_qtconcurrentmedian.cpp b/tests/auto/concurrent/qtconcurrentmedian/tst_qtconcurrentmedian.cpp index d02856b93f..ed166fd2dd 100644 --- a/tests/auto/concurrent/qtconcurrentmedian/tst_qtconcurrentmedian.cpp +++ b/tests/auto/concurrent/qtconcurrentmedian/tst_qtconcurrentmedian.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 #include diff --git a/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp index 51a2273f9d..f99b610566 100644 --- a/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.cpp +++ b/tests/auto/concurrent/qtconcurrentthreadengine/tst_qtconcurrentthreadengine.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 #include #include diff --git a/tests/auto/corelib/global/qglobal/CMakeLists.txt b/tests/auto/corelib/global/qglobal/CMakeLists.txt index ec078c93d8..5a0877663b 100644 --- a/tests/auto/corelib/global/qglobal/CMakeLists.txt +++ b/tests/auto/corelib/global/qglobal/CMakeLists.txt @@ -15,6 +15,8 @@ qt_internal_add_test(tst_qglobal SOURCES qglobal.c tst_qglobal.cpp + NO_PCH_SOURCES + tst_qglobal.cpp # undef QT_NO_FOREACH ) ## Scopes: diff --git a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp index e175db24b1..48b5714086 100644 --- a/tests/auto/corelib/global/qglobal/tst_qglobal.cpp +++ b/tests/auto/corelib/global/qglobal/tst_qglobal.cpp @@ -2,6 +2,8 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +#undef QT_NO_FOREACH // this file tests Q_FOREACH! + #include #include diff --git a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp index b093644013..029ef37373 100644 --- a/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp +++ b/tests/auto/corelib/io/qabstractfileengine/tst_qabstractfileengine.cpp @@ -1,6 +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 #include diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index d7b0d2b1c1..ff3db64934 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -2,6 +2,8 @@ // Copyright (C) 2017 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 #include #if QT_CONFIG(process) diff --git a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp index 303c2c9dcf..57bbff529d 100644 --- a/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp +++ b/tests/auto/corelib/io/qdiriterator/tst_qdiriterator.cpp @@ -1,6 +1,7 @@ // Copyright (C) 2021 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 diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 214b6354db..578ff7f89f 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -2,6 +2,8 @@ // Copyright (C) 2021 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 + #define _CRT_SECURE_NO_WARNINGS 1 #include diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index c9db19db22..97bada7668 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2021 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 #include #include diff --git a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp index a3623cdc0b..3c17b6eb57 100644 --- a/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp +++ b/tests/auto/corelib/io/qfileselector/tst_qfileselector.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2013 BlackBerry Limited. All rights reserved. // 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 #include diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 8438e904d1..057f37d1a9 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -1,5 +1,8 @@ // Copyright (C) 2021 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 #include diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp index 1f26dc785f..8eefbf974e 100644 --- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp +++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp @@ -2,6 +2,7 @@ // Copyright (C) 2013 David Faure // 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 #include diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 7cad434906..7cb269e983 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -2,6 +2,8 @@ // Copyright (C) 2020 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 #include #include diff --git a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp index 9e280b8c46..20e2ad96ef 100644 --- a/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp +++ b/tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2014 Ivan Komissarov // 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 #include #include diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp index 227c6260d3..bd371f1e0f 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -1,6 +1,7 @@ // Copyright (C) 2021 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 #include diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index 556571b346..6f4c99cf21 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -2,6 +2,8 @@ // Copyright (C) 2017 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 #include #include diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp index 6bf00ff57e..2174638abd 100644 --- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp +++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp @@ -1,6 +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 #include diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index d8ffe32b60..baae759dd1 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -3,6 +3,8 @@ // 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 // don't assume diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp index d808849b5b..9a775937aa 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp +++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp @@ -1,6 +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 "tst_qmimedatabase.h" #include diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp index e3ea818b01..128a9bd837 100644 --- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp +++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp @@ -1,5 +1,8 @@ // Copyright (C) 2020 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 + #define QFUTURE_TEST #include diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp index af7a7ec0df..8869395e1f 100644 --- a/tests/auto/corelib/tools/collections/tst_collections.cpp +++ b/tests/auto/corelib/tools/collections/tst_collections.cpp @@ -1,6 +1,7 @@ // 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 tests Q_FOREACH over containers (centralize in a tst_qforeach?) // test the container forwards #include diff --git a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp index 987cee0349..a36d620baf 100644 --- a/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp +++ b/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp @@ -1,6 +1,7 @@ // Copyright (C) 2021 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 #include diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp index 4989de521f..5bcb30110f 100644 --- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp @@ -1,6 +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 #include diff --git a/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp b/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp index 1b2cd610da..827d1e56fd 100644 --- a/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp +++ b/tests/auto/corelib/tools/qfreelist/tst_qfreelist.cpp @@ -1,6 +1,7 @@ // 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 #include diff --git a/tests/auto/corelib/tools/qlist/tst_qlist.cpp b/tests/auto/corelib/tools/qlist/tst_qlist.cpp index f52d4650d2..a761bca537 100644 --- a/tests/auto/corelib/tools/qlist/tst_qlist.cpp +++ b/tests/auto/corelib/tools/qlist/tst_qlist.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2021 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 #include #include 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 #include #include diff --git a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp index 01f174c3e8..e41ac792c5 100644 --- a/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp +++ b/tests/auto/dbus/qdbusxmlparser/tst_qdbusxmlparser.cpp @@ -1,6 +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 #include #include diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp index 10f3a813c3..ff5e67ec29 100644 --- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp @@ -1,6 +1,7 @@ // 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 diff --git a/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp b/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp index 4f2379fbb4..63c811f6cf 100644 --- a/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp +++ b/tests/auto/gui/kernel/qkeyevent/tst_qkeyevent.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2017 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 #include diff --git a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp index 6be46b9ee2..6fb7f5d300 100644 --- a/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp +++ b/tests/auto/gui/math3d/qquaternion/tst_qquaternion.cpp @@ -1,6 +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 #include #include diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 92c3ea4a5a..1606afca82 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -1,6 +1,7 @@ // 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 #include diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp index bb6ed1db91..83bc18db66 100644 --- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp +++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.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 #include #include diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index ff92af8169..b4880c1317 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -1,6 +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 #include #include diff --git a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp index 9bc9391989..fb2c2e28f6 100644 --- a/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp +++ b/tests/auto/gui/text/qglyphrun/tst_qglyphrun.cpp @@ -1,6 +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 #include diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp index 51bb1a65db..bea2556e68 100644 --- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp @@ -1,6 +1,7 @@ // 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 /* !!!!!! Warning !!!!! diff --git a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index ac07a0212a..4ffdd0577d 100644 --- a/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/network/access/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -1,6 +1,7 @@ // 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 #include diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp index 39199c91b5..f6edf61e73 100644 --- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp +++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp @@ -1,6 +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 #include #include diff --git a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt index fa353b2769..c28268ab14 100644 --- a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt +++ b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt @@ -24,6 +24,8 @@ qt_internal_add_test(tst_qnetworkreply ../tst_qnetworkreply.cpp ../data/gzip.rcc.cpp ../data/zstandard.rcc.cpp + NO_PCH_SOURCES + ../tst_qnetworkreply.cpp # undef QT_NO_FOREACH LIBRARIES Qt::CorePrivate Qt::NetworkPrivate diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 14b104fdc8..5919642c61 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2021 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 #include diff --git a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp index 89d9063f8e..27198d3e59 100644 --- a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp +++ b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp @@ -2,6 +2,7 @@ // 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 #include diff --git a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp index db06b83940..e0436d2d99 100644 --- a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp +++ b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp @@ -2,6 +2,7 @@ // 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 #include diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp index 1350dee150..a9f195aa21 100644 --- a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp +++ b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp @@ -1,6 +1,7 @@ // 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 #include diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index f42d0497fe..730d29ef81 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -1,6 +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 #if defined(_WIN32) #include diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp index c1b89f9e56..6cca5611d1 100644 --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp @@ -2,6 +2,8 @@ // Copyright (C) 2017 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 #if defined(_WIN32) diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index 4380433899..c4095700ca 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -2,6 +2,7 @@ // Copyright (C) 2017 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 #include diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp index 852825b5d9..748a50897b 100644 --- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp @@ -1,6 +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 #include diff --git a/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp b/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp index ab4b457333..31728b96ba 100644 --- a/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp +++ b/tests/auto/network/ssl/qsslellipticcurve/tst_qsslellipticcurve.cpp @@ -1,6 +1,7 @@ // Copyright (C) 2014 Governikus GmbH & Co. KG. // 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 diff --git a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp index 12f29bf107..d8296ca267 100644 --- a/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp +++ b/tests/auto/network/ssl/qsslkey/tst_qsslkey.cpp @@ -1,6 +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 #include #include diff --git a/tests/auto/other/gestures/tst_gestures.cpp b/tests/auto/other/gestures/tst_gestures.cpp index 4d87ee03df..42a61955b6 100644 --- a/tests/auto/other/gestures/tst_gestures.cpp +++ b/tests/auto/other/gestures/tst_gestures.cpp @@ -1,6 +1,7 @@ // 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 #include diff --git a/tests/auto/other/macgui/CMakeLists.txt b/tests/auto/other/macgui/CMakeLists.txt index 9fb51b40b6..afa3f0b8df 100644 --- a/tests/auto/other/macgui/CMakeLists.txt +++ b/tests/auto/other/macgui/CMakeLists.txt @@ -22,6 +22,8 @@ qt_internal_add_test(tst_macgui SOURCES guitest.cpp guitest.h tst_macgui.cpp + NO_PCH_SOURCES + guitest.cpp # undef QT_NO_FOREACH LIBRARIES Qt::CorePrivate Qt::WidgetsPrivate diff --git a/tests/auto/other/macgui/guitest.cpp b/tests/auto/other/macgui/guitest.cpp index 1f9ca0efcc..406ecfc8af 100644 --- a/tests/auto/other/macgui/guitest.cpp +++ b/tests/auto/other/macgui/guitest.cpp @@ -1,6 +1,7 @@ // 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 "guitest.h" #include diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 2fe8e0e5bd..5cc7404e91 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -1,6 +1,7 @@ // 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 #ifdef Q_OS_WIN diff --git a/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp b/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp index a496b5bfb9..2221f9d920 100644 --- a/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp +++ b/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2014 John Layt // 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 #include diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp index 6b058c88f4..1ddb302bd0 100644 --- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp +++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp @@ -1,6 +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 #include diff --git a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt index 680fd3753f..20329a95f1 100644 --- a/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt +++ b/tests/auto/testlib/qabstractitemmodeltester/CMakeLists.txt @@ -15,6 +15,8 @@ qt_internal_add_test(tst_qabstractitemmodeltester SOURCES ../../other/qabstractitemmodelutils/dynamictreemodel.cpp ../../other/qabstractitemmodelutils/dynamictreemodel.h tst_qabstractitemmodeltester.cpp + NO_PCH_SOURCES + tst_qabstractitemmodeltester.cpp # undef QT_NO_FOREACH INCLUDE_DIRECTORIES ../../other/qabstractitemmodelutils LIBRARIES diff --git a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp index ad146c526d..614ebb081e 100644 --- a/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp +++ b/tests/auto/testlib/qabstractitemmodeltester/tst_qabstractitemmodeltester.cpp @@ -1,6 +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 #include #include diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt index d6fc5ddef3..79aefb3a10 100644 --- a/tests/auto/testlib/selftests/CMakeLists.txt +++ b/tests/auto/testlib/selftests/CMakeLists.txt @@ -27,6 +27,8 @@ qt_internal_add_test(tst_selftests SOURCES tst_selftests.cpp catch.cpp + NO_PCH_SOURCES + tst_selftests.cpp # undef QT_NO_FOREACH LIBRARIES Qt::TestPrivate TESTDATA ${qmake_expected_files_resource_files} diff --git a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp index ec54f786d9..8a743bf702 100644 --- a/tests/auto/testlib/selftests/badxml/tst_badxml.cpp +++ b/tests/auto/testlib/selftests/badxml/tst_badxml.cpp @@ -1,6 +1,7 @@ // 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 #include diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 5ff1304ec2..e9bf64d3be 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -2,6 +2,8 @@ // 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 QT_REQUIRE_CONFIG(process); diff --git a/tests/auto/tools/moc/CMakeLists.txt b/tests/auto/tools/moc/CMakeLists.txt index f2a5a1dbe8..755a68ba72 100644 --- a/tests/auto/tools/moc/CMakeLists.txt +++ b/tests/auto/tools/moc/CMakeLists.txt @@ -72,6 +72,8 @@ qt_internal_add_test(tst_moc cxx-attributes.h tst_moc.cpp ${comparison_relevant_moc_list} + NO_PCH_SOURCES + tst_moc.cpp # undef QT_NO_FOREACH INCLUDE_DIRECTORIES testproject testproject/include diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 58bc00b055..470ae5b70a 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -2,6 +2,8 @@ // Copyright (C) 2020 Olivier Goffart // 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 #include #include diff --git a/tests/auto/tools/qmake/CMakeLists.txt b/tests/auto/tools/qmake/CMakeLists.txt index 8fe0566baa..6d046e66e3 100644 --- a/tests/auto/tools/qmake/CMakeLists.txt +++ b/tests/auto/tools/qmake/CMakeLists.txt @@ -17,6 +17,8 @@ qt_internal_add_test(tst_qmake SOURCES testcompiler.cpp testcompiler.h tst_qmake.cpp + NO_PCH_SOURCES + testcompiler.cpp # undef QT_NO_FOREACH TESTDATA ${test_data} ) diff --git a/tests/auto/tools/qmake/testcompiler.cpp b/tests/auto/tools/qmake/testcompiler.cpp index b092e23126..e5a99ee224 100644 --- a/tests/auto/tools/qmake/testcompiler.cpp +++ b/tests/auto/tools/qmake/testcompiler.cpp @@ -1,6 +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 "testcompiler.h" #include diff --git a/tests/auto/tools/qmakelib/CMakeLists.txt b/tests/auto/tools/qmakelib/CMakeLists.txt index 4c6a1e2a72..271c369cf0 100644 --- a/tests/auto/tools/qmakelib/CMakeLists.txt +++ b/tests/auto/tools/qmakelib/CMakeLists.txt @@ -24,6 +24,9 @@ qt_internal_add_test(tst_qmakelib evaltest.cpp parsertest.cpp tst_qmakelib.cpp tst_qmakelib.h + NO_PCH_SOURCES + evaltest.cpp # undef QT_NO_FOREACH + parsertest.cpp # undef QT_NO_FOREACH DEFINES PROEVALUATOR_FULL PROEVALUATOR_SETENV diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp index 8e6d7eada2..94355efdd8 100644 --- a/tests/auto/tools/qmakelib/evaltest.cpp +++ b/tests/auto/tools/qmakelib/evaltest.cpp @@ -1,6 +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 "tst_qmakelib.h" #include diff --git a/tests/auto/tools/qmakelib/parsertest.cpp b/tests/auto/tools/qmakelib/parsertest.cpp index 61746ddada..ec1ec5ccbb 100644 --- a/tests/auto/tools/qmakelib/parsertest.cpp +++ b/tests/auto/tools/qmakelib/parsertest.cpp @@ -1,6 +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 "tst_qmakelib.h" #include diff --git a/tests/baseline/painting/CMakeLists.txt b/tests/baseline/painting/CMakeLists.txt index 1c2100b596..72e737d227 100644 --- a/tests/baseline/painting/CMakeLists.txt +++ b/tests/baseline/painting/CMakeLists.txt @@ -17,6 +17,8 @@ qt_internal_add_test(tst_baseline_painting ../shared/qbaselinetest.cpp ../shared/qbaselinetest.h ../shared/paintcommands.cpp ../shared/paintcommands.h tst_baseline_painting.cpp + NO_PCH_SOURCES + tst_baseline_painting.cpp # undef QT_NO_FOREACH INCLUDE_DIRECTORIES ../shared LIBRARIES diff --git a/tests/baseline/painting/tst_baseline_painting.cpp b/tests/baseline/painting/tst_baseline_painting.cpp index f9738b61e8..9e91f051e7 100644 --- a/tests/baseline/painting/tst_baseline_painting.cpp +++ b/tests/baseline/painting/tst_baseline_painting.cpp @@ -1,6 +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 "paintcommands.h" #include #include diff --git a/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp index 80dbc0f141..43ae52afeb 100644 --- a/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp +++ b/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp @@ -1,6 +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 #include diff --git a/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt b/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt index 1958f86dd5..9002cc0723 100644 --- a/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt +++ b/tests/benchmarks/corelib/tools/qhash/CMakeLists.txt @@ -9,6 +9,8 @@ qt_internal_add_benchmark(tst_bench_qhash SOURCES tst_bench_qhash.cpp outofline.cpp + NO_PCH_SOURCES + tst_bench_qhash.cpp # undef QT_NO_FOREACH INCLUDE_DIRECTORIES . LIBRARIES diff --git a/tests/benchmarks/corelib/tools/qhash/tst_bench_qhash.cpp b/tests/benchmarks/corelib/tools/qhash/tst_bench_qhash.cpp index fd0a74b52a..9d9703dc0c 100644 --- a/tests/benchmarks/corelib/tools/qhash/tst_bench_qhash.cpp +++ b/tests/benchmarks/corelib/tools/qhash/tst_bench_qhash.cpp @@ -2,6 +2,8 @@ // 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 "tst_bench_qhash.h" #include diff --git a/tests/benchmarks/corelib/tools/qrect/tst_bench_qrect.cpp b/tests/benchmarks/corelib/tools/qrect/tst_bench_qrect.cpp index dbf4c2db6c..3f5f86b2cf 100644 --- a/tests/benchmarks/corelib/tools/qrect/tst_bench_qrect.cpp +++ b/tests/benchmarks/corelib/tools/qrect/tst_bench_qrect.cpp @@ -2,6 +2,8 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 // This file contains benchmarks for QRect/QRectF functions. +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + #include #include diff --git a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp index cccf9c703c..b7056efcac 100644 --- a/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/benchmarks/gui/painting/qpainter/tst_qpainter.cpp @@ -1,6 +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 #include #include diff --git a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp index 9b2b730950..6fe8998eb5 100644 --- a/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp +++ b/tests/benchmarks/gui/painting/qtbench/tst_qtbench.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2020 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 #include diff --git a/tests/manual/cocoa/menurama/CMakeLists.txt b/tests/manual/cocoa/menurama/CMakeLists.txt index 469bf9fbd2..3519fadcf9 100644 --- a/tests/manual/cocoa/menurama/CMakeLists.txt +++ b/tests/manual/cocoa/menurama/CMakeLists.txt @@ -11,6 +11,8 @@ qt_internal_add_manual_test(Menurama main.cpp mainwindow.cpp mainwindow.h mainwindow.ui menuramaapplication.cpp menuramaapplication.h + NO_PCH_SOURCES + menuramaapplication.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Gui Qt::Widgets diff --git a/tests/manual/cocoa/menurama/menuramaapplication.cpp b/tests/manual/cocoa/menurama/menuramaapplication.cpp index e3f7803aa7..e2911f9ca6 100644 --- a/tests/manual/cocoa/menurama/menuramaapplication.cpp +++ b/tests/manual/cocoa/menurama/menuramaapplication.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2017 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 "menuramaapplication.h" MenuramaApplication::MenuramaApplication(int &argc, char **argv) diff --git a/tests/manual/dialogs/CMakeLists.txt b/tests/manual/dialogs/CMakeLists.txt index b64043bf20..1900b68540 100644 --- a/tests/manual/dialogs/CMakeLists.txt +++ b/tests/manual/dialogs/CMakeLists.txt @@ -15,6 +15,9 @@ qt_internal_add_manual_test(dialogs messageboxpanel.cpp messageboxpanel.h utils.cpp utils.h wizardpanel.cpp wizardpanel.h + NO_PCH_SOURCES + filedialogpanel.cpp # undef QT_NO_FOREACH + utils.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Gui Qt::Widgets @@ -31,6 +34,8 @@ qt_internal_extend_target(dialogs CONDITION TARGET Qt::PrintSupport qt_internal_extend_target(dialogs CONDITION NOT (QT_FEATURE_printer EQUAL FALSE) SOURCES printdialogpanel.cpp printdialogpanel.h printdialogpanel.ui + NO_PCH_SOURCES + printdialogpanel.cpp # undef QT_NO_FOREACH ENABLE_AUTOGEN_TOOLS uic ) diff --git a/tests/manual/dialogs/filedialogpanel.cpp b/tests/manual/dialogs/filedialogpanel.cpp index f7e2cfa638..6f807d9280 100644 --- a/tests/manual/dialogs/filedialogpanel.cpp +++ b/tests/manual/dialogs/filedialogpanel.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2021 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 "filedialogpanel.h" #include "utils.h" diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp index 6fe2eeab14..6395475399 100644 --- a/tests/manual/dialogs/printdialogpanel.cpp +++ b/tests/manual/dialogs/printdialogpanel.cpp @@ -1,6 +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 + #ifndef QT_NO_PRINTER #include "printdialogpanel.h" diff --git a/tests/manual/dialogs/utils.cpp b/tests/manual/dialogs/utils.cpp index 9ac5f66a85..03e85d0191 100644 --- a/tests/manual/dialogs/utils.cpp +++ b/tests/manual/dialogs/utils.cpp @@ -1,6 +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 "utils.h" #include diff --git a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt index ca41eed228..a80206133b 100644 --- a/tests/manual/embeddedintoforeignwindow/CMakeLists.txt +++ b/tests/manual/embeddedintoforeignwindow/CMakeLists.txt @@ -13,6 +13,8 @@ qt_internal_add_manual_test(embeddedintoforeignwindow ../diaglib/textdump.cpp ../diaglib/textdump.h itemwindow.cpp itemwindow.h main.cpp + NO_PCH_SOURCES + itemwindow.cpp # undef QT_NO_FOREACH DEFINES QT_DIAG_LIB INCLUDE_DIRECTORIES diff --git a/tests/manual/embeddedintoforeignwindow/itemwindow.cpp b/tests/manual/embeddedintoforeignwindow/itemwindow.cpp index 143cdea402..5e2880407b 100644 --- a/tests/manual/embeddedintoforeignwindow/itemwindow.cpp +++ b/tests/manual/embeddedintoforeignwindow/itemwindow.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2017 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 "itemwindow.h" #include diff --git a/tests/manual/gestures/scrollarea/CMakeLists.txt b/tests/manual/gestures/scrollarea/CMakeLists.txt index 7ea3ed5b6b..02ea63d040 100644 --- a/tests/manual/gestures/scrollarea/CMakeLists.txt +++ b/tests/manual/gestures/scrollarea/CMakeLists.txt @@ -10,6 +10,8 @@ qt_internal_add_manual_test(scrollarea SOURCES main.cpp mousepangesturerecognizer.cpp mousepangesturerecognizer.h + NO_PCH_SOURCES + main.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Gui Qt::Widgets diff --git a/tests/manual/gestures/scrollarea/main.cpp b/tests/manual/gestures/scrollarea/main.cpp index e8764a5ded..0a149d4f05 100644 --- a/tests/manual/gestures/scrollarea/main.cpp +++ b/tests/manual/gestures/scrollarea/main.cpp @@ -1,6 +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 #include #include diff --git a/tests/manual/lance/CMakeLists.txt b/tests/manual/lance/CMakeLists.txt index 9a4ebb88b2..41eb18b6c2 100644 --- a/tests/manual/lance/CMakeLists.txt +++ b/tests/manual/lance/CMakeLists.txt @@ -11,6 +11,8 @@ qt_internal_add_manual_test(lance interactivewidget.cpp interactivewidget.h main.cpp widgets.h + NO_PCH_SOURCES + interactivewidget.cpp # undef QT_NO_FOREACH INCLUDE_DIRECTORIES . ../../baseline/shared diff --git a/tests/manual/lance/interactivewidget.cpp b/tests/manual/lance/interactivewidget.cpp index cd2084978c..9b939882bf 100644 --- a/tests/manual/lance/interactivewidget.cpp +++ b/tests/manual/lance/interactivewidget.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 "interactivewidget.h" #include diff --git a/tests/manual/qgraphicsitemgroup/CMakeLists.txt b/tests/manual/qgraphicsitemgroup/CMakeLists.txt index 7a3cb00e8e..d6a158fac5 100644 --- a/tests/manual/qgraphicsitemgroup/CMakeLists.txt +++ b/tests/manual/qgraphicsitemgroup/CMakeLists.txt @@ -11,6 +11,8 @@ qt_internal_add_manual_test(qgraphicsitemgroup customitem.cpp customitem.h main.cpp widget.cpp widget.h widget.ui + NO_PCH_SOURCES + widget.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Gui Qt::Widgets diff --git a/tests/manual/qgraphicsitemgroup/widget.cpp b/tests/manual/qgraphicsitemgroup/widget.cpp index 2ef479201a..c455ad5fbd 100644 --- a/tests/manual/qgraphicsitemgroup/widget.cpp +++ b/tests/manual/qgraphicsitemgroup/widget.cpp @@ -1,6 +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 "widget.h" #include "ui_widget.h" #include diff --git a/tests/manual/qlocale/CMakeLists.txt b/tests/manual/qlocale/CMakeLists.txt index a5f9ac4cf4..e749565129 100644 --- a/tests/manual/qlocale/CMakeLists.txt +++ b/tests/manual/qlocale/CMakeLists.txt @@ -17,6 +17,8 @@ qt_internal_add_manual_test(qlocale miscellaneous.cpp miscellaneous.h numberformats.cpp numberformats.h window.cpp window.h + NO_PCH_SOURCES + languages.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Gui Qt::Widgets diff --git a/tests/manual/qlocale/languages.cpp b/tests/manual/qlocale/languages.cpp index 75e4a0ee9f..360d5fe569 100644 --- a/tests/manual/qlocale/languages.cpp +++ b/tests/manual/qlocale/languages.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2017 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 "languages.h" #include diff --git a/tests/manual/qmimedatabase/main.cpp b/tests/manual/qmimedatabase/main.cpp index 7b2c6dddd6..bed0dee613 100644 --- a/tests/manual/qmimedatabase/main.cpp +++ b/tests/manual/qmimedatabase/main.cpp @@ -1,6 +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 #include #include diff --git a/tests/manual/qnetworkaccessmanager/qget/CMakeLists.txt b/tests/manual/qnetworkaccessmanager/qget/CMakeLists.txt index 62925f8229..e870ab2b62 100644 --- a/tests/manual/qnetworkaccessmanager/qget/CMakeLists.txt +++ b/tests/manual/qnetworkaccessmanager/qget/CMakeLists.txt @@ -10,6 +10,9 @@ qt_internal_add_manual_test(qget downloadmanager.cpp qget.cpp qget.h transferitem.cpp + NO_PCH_SOURCES + downloadmanager.cpp # undef QT_NO_FOREACH + qget.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Network ) diff --git a/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp b/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp index 4a7e03eea8..48ada11e7a 100644 --- a/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp +++ b/tests/manual/qnetworkaccessmanager/qget/downloadmanager.cpp @@ -1,6 +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 "qget.h" #include #include diff --git a/tests/manual/qnetworkaccessmanager/qget/qget.cpp b/tests/manual/qnetworkaccessmanager/qget/qget.cpp index d9874afec9..7e59b51638 100644 --- a/tests/manual/qnetworkaccessmanager/qget/qget.cpp +++ b/tests/manual/qnetworkaccessmanager/qget/qget.cpp @@ -1,6 +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 "qget.h" #include diff --git a/tests/manual/qopenglwidget/openglwidget/CMakeLists.txt b/tests/manual/qopenglwidget/openglwidget/CMakeLists.txt index ca04a82199..967feda558 100644 --- a/tests/manual/qopenglwidget/openglwidget/CMakeLists.txt +++ b/tests/manual/qopenglwidget/openglwidget/CMakeLists.txt @@ -10,6 +10,8 @@ qt_internal_add_manual_test(openglwidget SOURCES main.cpp openglwidget.cpp openglwidget.h + NO_PCH_SOURCES + main.cpp # undef QT_NO_FOREACH LIBRARIES Qt::CorePrivate Qt::Gui diff --git a/tests/manual/qopenglwidget/openglwidget/main.cpp b/tests/manual/qopenglwidget/openglwidget/main.cpp index 7ea5a4e7d7..1930e68bdd 100644 --- a/tests/manual/qopenglwidget/openglwidget/main.cpp +++ b/tests/manual/qopenglwidget/openglwidget/main.cpp @@ -1,6 +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 "openglwidget.h" #include #include diff --git a/tests/manual/qprintdevice_dump/main.cpp b/tests/manual/qprintdevice_dump/main.cpp index b7c7ee2194..fb677285ee 100644 --- a/tests/manual/qprintdevice_dump/main.cpp +++ b/tests/manual/qprintdevice_dump/main.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2014 John Layt // 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 #include diff --git a/tests/manual/qscreen/CMakeLists.txt b/tests/manual/qscreen/CMakeLists.txt index 7880cf2b21..4149310df4 100644 --- a/tests/manual/qscreen/CMakeLists.txt +++ b/tests/manual/qscreen/CMakeLists.txt @@ -10,6 +10,8 @@ qt_internal_add_manual_test(qscreen main.cpp propertyfield.cpp propertyfield.h propertywatcher.cpp propertywatcher.h + NO_PCH_SOURCES + main.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Gui Qt::Widgets diff --git a/tests/manual/qscreen/main.cpp b/tests/manual/qscreen/main.cpp index f6c22e88a8..1335d7d6e6 100644 --- a/tests/manual/qscreen/main.cpp +++ b/tests/manual/qscreen/main.cpp @@ -1,6 +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 "propertywatcher.h" #include #include diff --git a/tests/manual/textrendering/glyphshaping/main.cpp b/tests/manual/textrendering/glyphshaping/main.cpp index b9f94d46b5..a31c98f840 100644 --- a/tests/manual/textrendering/glyphshaping/main.cpp +++ b/tests/manual/textrendering/glyphshaping/main.cpp @@ -1,6 +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 #include #include diff --git a/tests/manual/textrendering/textperformance/main.cpp b/tests/manual/textrendering/textperformance/main.cpp index fa3a5122ce..094c314de4 100644 --- a/tests/manual/textrendering/textperformance/main.cpp +++ b/tests/manual/textrendering/textperformance/main.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2020 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 #include #include diff --git a/tests/manual/wasm/clipboard/CMakeLists.txt b/tests/manual/wasm/clipboard/CMakeLists.txt index 80e049097b..40fb8ca308 100644 --- a/tests/manual/wasm/clipboard/CMakeLists.txt +++ b/tests/manual/wasm/clipboard/CMakeLists.txt @@ -10,6 +10,8 @@ qt_internal_add_manual_test(clipboard SOURCES main.cpp mainwindow.cpp mainwindow.h mainwindow.ui + NO_PCH_SOURCES + main.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Core Qt::Gui diff --git a/tests/manual/wasm/clipboard/mainwindow.cpp b/tests/manual/wasm/clipboard/mainwindow.cpp index 77d6582775..96fb494cb3 100644 --- a/tests/manual/wasm/clipboard/mainwindow.cpp +++ b/tests/manual/wasm/clipboard/mainwindow.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2021 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses + #include "mainwindow.h" #include "ui_mainwindow.h" #include diff --git a/tests/manual/windowflags/CMakeLists.txt b/tests/manual/windowflags/CMakeLists.txt index 3e34d4452f..27e4fd5ba6 100644 --- a/tests/manual/windowflags/CMakeLists.txt +++ b/tests/manual/windowflags/CMakeLists.txt @@ -12,6 +12,8 @@ qt_internal_add_manual_test(tst_manual_windowflags controls.cpp controls.h main.cpp previewwindow.cpp previewwindow.h + NO_PCH_SOURCES + controls.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Gui Qt::Widgets diff --git a/tests/manual/windowflags/controls.cpp b/tests/manual/windowflags/controls.cpp index 43d8fac4c1..46ec27c1c6 100644 --- a/tests/manual/windowflags/controls.cpp +++ b/tests/manual/windowflags/controls.cpp @@ -1,6 +1,8 @@ // Copyright (C) 2021 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 "controls.h" #include