diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-12-22 10:04:27 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-12-22 11:29:29 +0000 |
commit | 8c3946e5f957f5dc5cd1f2e549edd8999f63eeb6 (patch) | |
tree | e328171b5b88015ab60c04db8f6e9bcb90d148f9 /src/kmap2qmap | |
parent | 3269e2aa561db8fa14f09d4545b5feefa3602ad5 (diff) |
foreach cleanup in the the smaller tools
Replace foreach by C++ 11 range based for in
kmap2qmap, makeqpf, pixeltool, qdbus, qtattributionsscanner,
qtdiag, qtplugininfo, winrtrunner and the simpletextviewer example.
Change-Id: I079da84c47a1584526f4fe188377c0262419a44d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/kmap2qmap')
-rw-r--r-- | src/kmap2qmap/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kmap2qmap/main.cpp b/src/kmap2qmap/main.cpp index 9fd7e9ae8..60d49ddca 100644 --- a/src/kmap2qmap/main.cpp +++ b/src/kmap2qmap/main.cpp @@ -603,7 +603,8 @@ bool KeymapParser::parseKmap(QFile *f) keymaps.clear(); if (tokens.count() > 1) { - foreach (const QByteArray §ion, tokens[1].split(',')) { + const QByteArrayList tokenList = tokens[1].split(','); + for (const QByteArray §ion : tokenList) { int dashpos = section.indexOf('-'); //qWarning("Section %s", section.constData()); @@ -645,7 +646,7 @@ bool KeymapParser::parseKmap(QFile *f) searchpath << d; searchpath << QDir::current(); - foreach (const QDir &path, searchpath) { + for (const QDir &path : qAsConst(searchpath)) { QFile f2(path.filePath(incname)); //qWarning(" -- trying to include %s", qPrintable(f2.fileName())); if (f2.open(QIODevice::ReadOnly)) { |