From cb84d80c8a5a31dc6b1954ec84a732d29763203a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 10 Apr 2025 13:56:30 +0200 Subject: [PATCH] Include , not Avoid module-wide inclusions for QtTest. The transitive inclusions eat a considerable amount of compilation time. Task-number: QTQAINFRA-7110 Pick-to: 6.8 Change-Id: Ic1c93b40b638ea5bff739be212f173457bae26aa Reviewed-by: Thiago Macieira (cherry picked from commit 5e1a1787322ce20752fc5f5251364e4e3d211dca) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/cmake/test_add_resources_big_resources/main.cpp | 2 +- tests/auto/cmake/test_resource_without_obj_lib/main.cpp | 2 +- .../test_init_resources_static_plugin.cpp | 2 +- .../test_static_resources_propagation/main.cpp | 2 +- tests/auto/corelib/kernel/qjniarray/tst_qjniarray.cpp | 2 +- .../auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp | 2 +- tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp | 2 +- tests/auto/corelib/kernel/qjnitypes/tst_qjnitypes.cpp | 2 +- tests/auto/corelib/platform/windows/qbstr/tst_qbstr.cpp | 2 +- .../corelib/tools/qduplicatetracker/tst_qduplicatetracker.cpp | 2 +- tests/auto/tools/windeployqt/tst_windeployqt.cpp | 2 +- tests/manual/ios_assets/main.cpp | 2 +- tests/manual/qscreen_xrandr/tst_qscreen_xrandr.cpp | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/auto/cmake/test_add_resources_big_resources/main.cpp b/tests/auto/cmake/test_add_resources_big_resources/main.cpp index 8ff0c4f54cf..17a405a564e 100644 --- a/tests/auto/cmake/test_add_resources_big_resources/main.cpp +++ b/tests/auto/cmake/test_add_resources_big_resources/main.cpp @@ -4,7 +4,7 @@ #include "intermediate_lib.h" #include -#include +#include class TestAddResourcesBigResources : public QObject { diff --git a/tests/auto/cmake/test_resource_without_obj_lib/main.cpp b/tests/auto/cmake/test_resource_without_obj_lib/main.cpp index bffbf81b873..43947edc6e7 100644 --- a/tests/auto/cmake/test_resource_without_obj_lib/main.cpp +++ b/tests/auto/cmake/test_resource_without_obj_lib/main.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include -#include +#include class TestManualResourceInit : public QObject { diff --git a/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/test_init_resources_static_plugin.cpp b/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/test_init_resources_static_plugin.cpp index 2067b8c920b..3f011384086 100644 --- a/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/test_init_resources_static_plugin.cpp +++ b/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/test_init_resources_static_plugin.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2021 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -#include +#include #include #include #include diff --git a/tests/auto/cmake/test_static_resources/test_static_resources_propagation/main.cpp b/tests/auto/cmake/test_static_resources/test_static_resources_propagation/main.cpp index c5d5312eb80..6b1b767cba9 100644 --- a/tests/auto/cmake/test_static_resources/test_static_resources_propagation/main.cpp +++ b/tests/auto/cmake/test_static_resources/test_static_resources_propagation/main.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2021 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -#include +#include #include #include #include diff --git a/tests/auto/corelib/kernel/qjniarray/tst_qjniarray.cpp b/tests/auto/corelib/kernel/qjniarray/tst_qjniarray.cpp index 97510ecfa1f..b6a6d4d2cdf 100644 --- a/tests/auto/corelib/kernel/qjniarray/tst_qjniarray.cpp +++ b/tests/auto/corelib/kernel/qjniarray/tst_qjniarray.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -#include +#include #include #include diff --git a/tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp b/tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp index 95748f46f73..53b39ff2e16 100644 --- a/tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp +++ b/tests/auto/corelib/kernel/qjnienvironment/tst_qjnienvironment.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include static const char javaTestClass[] = "org/qtproject/qt/android/testdatapackage/QtJniEnvironmentTestClass"; diff --git a/tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp b/tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp index 6291c70fdeb..62ffae0daa5 100644 --- a/tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp +++ b/tests/auto/corelib/kernel/qjniobject/tst_qjniobject.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include using namespace Qt::StringLiterals; diff --git a/tests/auto/corelib/kernel/qjnitypes/tst_qjnitypes.cpp b/tests/auto/corelib/kernel/qjnitypes/tst_qjnitypes.cpp index 3b9092d3df9..4bd84513b3b 100644 --- a/tests/auto/corelib/kernel/qjnitypes/tst_qjnitypes.cpp +++ b/tests/auto/corelib/kernel/qjnitypes/tst_qjnitypes.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2022 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -#include +#include #include #include diff --git a/tests/auto/corelib/platform/windows/qbstr/tst_qbstr.cpp b/tests/auto/corelib/platform/windows/qbstr/tst_qbstr.cpp index 12d180ddf4f..1d6bfeca1ab 100644 --- a/tests/auto/corelib/platform/windows/qbstr/tst_qbstr.cpp +++ b/tests/auto/corelib/platform/windows/qbstr/tst_qbstr.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -#include +#include #ifdef Q_OS_WIN diff --git a/tests/auto/corelib/tools/qduplicatetracker/tst_qduplicatetracker.cpp b/tests/auto/corelib/tools/qduplicatetracker/tst_qduplicatetracker.cpp index ef8c36e9c55..eecc8b52d28 100644 --- a/tests/auto/corelib/tools/qduplicatetracker/tst_qduplicatetracker.cpp +++ b/tests/auto/corelib/tools/qduplicatetracker/tst_qduplicatetracker.cpp @@ -1,7 +1,7 @@ // Copyright (C) 2020 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only -#include +#include #include diff --git a/tests/auto/tools/windeployqt/tst_windeployqt.cpp b/tests/auto/tools/windeployqt/tst_windeployqt.cpp index 0daf2878077..425b57d27bb 100644 --- a/tests/auto/tools/windeployqt/tst_windeployqt.cpp +++ b/tests/auto/tools/windeployqt/tst_windeployqt.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include static const QString msgProcessError(const QProcess &process, const QString &what, const QByteArray &stdOut = QByteArray(), diff --git a/tests/manual/ios_assets/main.cpp b/tests/manual/ios_assets/main.cpp index bbad425b625..5a6e329171d 100644 --- a/tests/manual/ios_assets/main.cpp +++ b/tests/manual/ios_assets/main.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #ifdef DEBUG_APP_DATA_LOCATION #include diff --git a/tests/manual/qscreen_xrandr/tst_qscreen_xrandr.cpp b/tests/manual/qscreen_xrandr/tst_qscreen_xrandr.cpp index 542214792c5..7cd508a1b75 100644 --- a/tests/manual/qscreen_xrandr/tst_qscreen_xrandr.cpp +++ b/tests/manual/qscreen_xrandr/tst_qscreen_xrandr.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include class tst_QScreen_Xrandr: public QObject {