QtNetwork auto tests: compile with QT_NO_FOREACH

Remove all "#undef QT_NO_FOREACH" white-listing from source files.
Previous commits have removed all remaining Q_FOREACH/foreach uses in
this sub-tree.

Also remove one source file from NO_PCH_SOURCES in CMakeLists.txt.

Task-number: QTBUG-115839
Change-Id: I02cf994eda720c028e613407342fbd6658fa62b1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Ahmad Samir 2023-08-11 20:15:15 +03:00
parent d489d207c4
commit 40f863738b
13 changed files with 0 additions and 26 deletions

View File

@ -1,8 +1,6 @@
// 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>
#include <QtCore/QJsonArray>
#include <QtCore/QJsonDocument>

View File

@ -1,8 +1,6 @@
// 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 <QtNetwork/QtNetwork>
#include <QTest>
#include <QTestEventLoop>

View File

@ -24,8 +24,6 @@ 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

View File

@ -1,8 +1,6 @@
// 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 <QtNetwork/qtnetworkglobal.h>
#include <QTest>

View File

@ -2,8 +2,6 @@
// 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 <QTest>
#include <QSignalSpy>

View File

@ -2,8 +2,6 @@
// 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 <QTest>
#include <QtEndian>
#include <QSet>

View File

@ -1,8 +1,6 @@
// 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 <QtTest/QTest>
#include <QtTest/QTestEventLoop>

View File

@ -1,8 +1,6 @@
// 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 <qglobal.h>
#if defined(_WIN32)
#include <winsock2.h>

View File

@ -2,8 +2,6 @@
// 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 <qglobal.h>
#if defined(_WIN32)

View File

@ -2,8 +2,6 @@
// 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 <QTest>
#include <QSignalSpy>
#include <QtEndian>

View File

@ -1,8 +1,6 @@
// 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>
#include <QtNetwork/qtnetworkglobal.h>

View File

@ -1,8 +1,6 @@
// 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 <QTest>
#include <QtNetwork/qtnetworkglobal.h>

View File

@ -1,8 +1,6 @@
// 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>
#include <qsslkey.h>
#include <qsslsocket.h>