summaryrefslogtreecommitdiffstats
path: root/src/kmap2qmap
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-12-22 10:04:27 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-12-22 11:29:29 +0000
commit8c3946e5f957f5dc5cd1f2e549edd8999f63eeb6 (patch)
treee328171b5b88015ab60c04db8f6e9bcb90d148f9 /src/kmap2qmap
parent3269e2aa561db8fa14f09d4545b5feefa3602ad5 (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.cpp5
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 &section, tokens[1].split(',')) {
+ const QByteArrayList tokenList = tokens[1].split(',');
+ for (const QByteArray &section : 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)) {