aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
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/auto/tools
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/auto/tools')
-rw-r--r--tests/auto/tools/tst_tools.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/tools/tst_tools.cpp b/tests/auto/tools/tst_tools.cpp
index 9707cb4ff..957f08885 100644
--- a/tests/auto/tools/tst_tools.cpp
+++ b/tests/auto/tools/tst_tools.cpp
@@ -427,8 +427,8 @@ void TestTools::testProcessNameByPid()
int toNumber(const QString &str)
{
int res = 0;
- for (int i = 0; i < str.length(); ++i)
- res = (res * 10) + str[i].digitValue();
+ for (const QChar &c : str)
+ res = (res * 10) + c.digitValue();
return res;
}