aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotest
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-01-07 06:10:37 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-01-08 10:53:12 +0000
commit75e8d4767b91d9884e8ee860877190035f7b6176 (patch)
tree034b031000aee571f86adc50b2ff08fc9fc71c4a /src/plugins/autotest
parent4f857711c2dfdd3214948bc7d19e368db2fd37eb (diff)
Autotest: Avoid using keys()
Instead, iterate directly over the container. Change-Id: I4a29d1e81f2cbb01f2c06bed4035cf45e51b9dd7 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/autotest')
-rw-r--r--src/plugins/autotest/autotestunittests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/autotest/autotestunittests.cpp b/src/plugins/autotest/autotestunittests.cpp
index 2a21f0700a7..7ef019dac15 100644
--- a/src/plugins/autotest/autotestunittests.cpp
+++ b/src/plugins/autotest/autotestunittests.cpp
@@ -270,8 +270,8 @@ void AutoTestUnitTests::testCodeParserBoostTest()
QMap<QString, int> foundNamesAndSets = m_model->boostTestSuitesAndTests();
QCOMPARE(expectedSuitesAndTests.size(), foundNamesAndSets.size());
- for (const QString &name : expectedSuitesAndTests.keys())
- QCOMPARE(expectedSuitesAndTests.value(name), foundNamesAndSets.value(name));
+ for (auto it = expectedSuitesAndTests.cbegin(); it != expectedSuitesAndTests.cend(); ++it)
+ QCOMPARE(*it, foundNamesAndSets.value(it.key()));
// check also that no Qt related tests have been found
QCOMPARE(m_model->autoTestsCount(), 0);