aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fuzzy-test
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-10-24 18:52:45 -0700
committerJake Petroules <jake.petroules@qt.io>2017-11-27 18:54:51 +0000
commit3e49f3cbb68a985ec1ed6f243988e486f0877a73 (patch)
treecfeda1e54b12eccf1417fc7ae35e895c20252a59 /tests/fuzzy-test
parent602ec12826f3b5522831b791efcbcddb2dfa8ed6 (diff)
Replace more loops with range-for
...or raw iterators for reverse iterations. Change-Id: I62a110ceeefaf70aaa41f6fb09d811f0eac05657 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/fuzzy-test')
-rw-r--r--tests/fuzzy-test/fuzzytester.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/fuzzy-test/fuzzytester.cpp b/tests/fuzzy-test/fuzzytester.cpp
index 09a5f25f3..37a6c56fe 100644
--- a/tests/fuzzy-test/fuzzytester.cpp
+++ b/tests/fuzzy-test/fuzzytester.cpp
@@ -158,8 +158,8 @@ QString FuzzyTester::findWorkingStartCommit(const QString &startCommit)
const QStringList allCommits = findAllCommits(startCommit);
QString qbsError;
m_currentActivity = buildFromScratchActivity();
- for (int i = allCommits.size() - 1; i >= 0; --i) {
- m_currentCommit = allCommits.at(i);
+ for (auto it = allCommits.crbegin(), end = allCommits.crend(); it != end; ++it) {
+ m_currentCommit = *it;
if (m_unbuildableCommits.contains(m_currentCommit)) {
qDebug("Skipping known bad commit %s.", qPrintable(m_currentCommit));
continue;