summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/barstest/CMakeLists.txt2
-rw-r--r--tests/manual/barstest/chart.cpp2
-rw-r--r--tests/manual/itemmodeltest/main.cpp4
-rw-r--r--tests/manual/scattertest/CMakeLists.txt2
-rw-r--r--tests/manual/scattertest/scatterchart.cpp2
-rw-r--r--tests/manual/surfacetest/CMakeLists.txt2
-rw-r--r--tests/manual/surfacetest/graphmodifier.cpp2
7 files changed, 14 insertions, 2 deletions
diff --git a/tests/manual/barstest/CMakeLists.txt b/tests/manual/barstest/CMakeLists.txt
index 399ae44c..391b98aa 100644
--- a/tests/manual/barstest/CMakeLists.txt
+++ b/tests/manual/barstest/CMakeLists.txt
@@ -11,6 +11,8 @@ qt_internal_add_manual_test(barstest
buttonwrapper.cpp buttonwrapper.h
custominputhandler.cpp custominputhandler.h
main.cpp
+ NO_PCH_SOURCES
+ chart.cpp # undef QT_NO_FOREACH
)
target_link_libraries(barstest PUBLIC
Qt::Gui
diff --git a/tests/manual/barstest/chart.cpp b/tests/manual/barstest/chart.cpp
index 6a6291cc..d427921a 100644
--- a/tests/manual/barstest/chart.cpp
+++ b/tests/manual/barstest/chart.cpp
@@ -1,6 +1,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
+
#include "chart.h"
#include "custominputhandler.h"
#include <QtDataVisualization/qcategory3daxis.h>
diff --git a/tests/manual/itemmodeltest/main.cpp b/tests/manual/itemmodeltest/main.cpp
index b2fadaea..32682ee3 100644
--- a/tests/manual/itemmodeltest/main.cpp
+++ b/tests/manual/itemmodeltest/main.cpp
@@ -208,8 +208,8 @@ void GraphDataGenerator::changeSelectedButtonClicked()
{
// Change all selected cells to a random value 1-10
QVariant value = QVariant::fromValue(QRandomGenerator::global()->bounded(10.0) + 1);
- QList<QTableWidgetItem *> selectedItems = m_tableWidget->selectedItems();
- foreach (QTableWidgetItem *item, selectedItems) {
+ const QList<QTableWidgetItem *> selectedItems = m_tableWidget->selectedItems();
+ for (QTableWidgetItem *item : selectedItems) {
QString oldData = item->data(Qt::DisplayRole).toString();
item->setData(Qt::DisplayRole,
oldData.left(5)
diff --git a/tests/manual/scattertest/CMakeLists.txt b/tests/manual/scattertest/CMakeLists.txt
index ac131567..89013c12 100644
--- a/tests/manual/scattertest/CMakeLists.txt
+++ b/tests/manual/scattertest/CMakeLists.txt
@@ -8,6 +8,8 @@ qt_internal_add_manual_test(scattertest
SOURCES
main.cpp
scatterchart.cpp scatterchart.h
+ NO_PCH_SOURCES
+ scatterchart.cpp # undef QT_NO_FOREACH
)
target_link_libraries(scattertest PUBLIC
Qt::Gui
diff --git a/tests/manual/scattertest/scatterchart.cpp b/tests/manual/scattertest/scatterchart.cpp
index 8a521a2e..fce115d4 100644
--- a/tests/manual/scattertest/scatterchart.cpp
+++ b/tests/manual/scattertest/scatterchart.cpp
@@ -1,6 +1,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
+
#include "scatterchart.h"
#include <QtDataVisualization/qscatterdataproxy.h>
#include <QtDataVisualization/qscatter3dseries.h>
diff --git a/tests/manual/surfacetest/CMakeLists.txt b/tests/manual/surfacetest/CMakeLists.txt
index 42e8bf07..bb3f0500 100644
--- a/tests/manual/surfacetest/CMakeLists.txt
+++ b/tests/manual/surfacetest/CMakeLists.txt
@@ -10,6 +10,8 @@ qt_internal_add_manual_test(surfacetest
checkboxwrapper.cpp checkboxwrapper.h
graphmodifier.cpp graphmodifier.h
main.cpp
+ NO_PCH_SOURCES
+ graphmodifier.cpp # undef QT_NO_FOREACH
)
target_link_libraries(surfacetest PUBLIC
Qt::Gui
diff --git a/tests/manual/surfacetest/graphmodifier.cpp b/tests/manual/surfacetest/graphmodifier.cpp
index fb0e4e6d..f406513d 100644
--- a/tests/manual/surfacetest/graphmodifier.cpp
+++ b/tests/manual/surfacetest/graphmodifier.cpp
@@ -1,6 +1,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
+
#include "graphmodifier.h"
#include <QtDataVisualization/QValue3DAxis>
#include <QtDataVisualization/QSurfaceDataProxy>