summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2023-08-22 15:10:27 +0200
committerRobert Griebl <robert.griebl@qt.io>2023-08-22 16:26:16 +0200
commitbdb6ecb8d354df3fe68351a28cdd64ed1ca9079e (patch)
treef3849049097d3b1f94d750afcae3271effa15431 /tests
parentc25f38c635fffdb0102eb592cf55d10c2f30fc85 (diff)
Remove the last foreach in the tests
Nowadays, even tests are compiled with QT_NO_FOREACH Change-Id: Ife9accc496d39d8d622c011a0ba5312331054733 Pick-to: 6.6 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/applicationinstaller/tst_applicationinstaller.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/applicationinstaller/tst_applicationinstaller.cpp b/tests/auto/applicationinstaller/tst_applicationinstaller.cpp
index 594a010f..43719439 100644
--- a/tests/auto/applicationinstaller/tst_applicationinstaller.cpp
+++ b/tests/auto/applicationinstaller/tst_applicationinstaller.cpp
@@ -567,12 +567,14 @@ void tst_PackageManager::simulateErrorConditions()
clearSignalSpies();
}
- foreach (const auto &f, functions.values("before-start"))
+ const auto beforeStart = functions.values("before-start");
+ for (const auto &f : beforeStart)
QVERIFY(f());
taskId = m_pm->startPackageInstallation(QUrl::fromLocalFile(qL1S(AM_TESTDATA_DIR "packages/test-dev-signed.appkg")));
- foreach (const auto &f, functions.values("after-start"))
+ const auto afterStart = functions.values("after-start");
+ for (const auto &f : afterStart)
QVERIFY(f());
m_pm->acknowledgePackageInstallation(taskId);
@@ -582,7 +584,8 @@ void tst_PackageManager::simulateErrorConditions()
AM_CHECK_ERRORSTRING(m_failedSpy->first()[2].toString(), errorString);
clearSignalSpies();
- foreach (const auto &f, functions.values("after-failed"))
+ const auto afterFailed = functions.values("after-failed");
+ for (const auto &f : afterFailed)
QVERIFY(f());
if (testUpdate) {