aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qml/main.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-08-23 16:39:29 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-08-23 16:43:58 +0200
commite2736212a7762d8c6d474d64bec1df87799cf33b (patch)
tree9d5c88e10d32fd872c3ab6b8d312fc9f350c26d4 /tools/qml/main.cpp
parent3eed20c22ee046c42fec81b0d9d6e47a27bdbe03 (diff)
parent8eeede619f417904cbd33fd44143f857dfce0996 (diff)
Merge branch remote-tracking branch '5.8' into wip/pointerhandler
Diffstat (limited to 'tools/qml/main.cpp')
-rw-r--r--tools/qml/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index d718067616..be62500858 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -192,7 +192,7 @@ public Q_SLOTS:
checkForWindow(o);
haveOne = true;
if (conf && qae)
- foreach (PartialScene *ps, conf->completers)
+ for (PartialScene *ps : qAsConst(conf->completers))
if (o->inherits(ps->itemType().toUtf8().constData()))
contain(o, ps->container());
}
@@ -413,8 +413,8 @@ static void loadDummyDataFiles(QQmlEngine &engine, const QString& directory)
QObject *dummyData = comp.create();
if (comp.isError()) {
- QList<QQmlError> errors = comp.errors();
- foreach (const QQmlError &error, errors)
+ const QList<QQmlError> errors = comp.errors();
+ for (const QQmlError &error : errors)
qWarning() << error;
}
@@ -566,7 +566,7 @@ int main(int argc, char *argv[])
if (!dummyDir.isEmpty() && QFileInfo (dummyDir).isDir())
loadDummyDataFiles(e, dummyDir);
- foreach (const QString &path, files) {
+ for (const QString &path : qAsConst(files)) {
//QUrl::fromUserInput doesn't treat no scheme as relative file paths
#ifndef QT_NO_REGULAREXPRESSION
QRegularExpression urlRe("[[:word:]]+://.*");