aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-09-08 13:43:52 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-09-20 10:37:30 +0000
commitce23d074f21854ad34880e798b3a572db21397e2 (patch)
tree41fd7789b8e8fa99e0bdc7573c4ab5f6b4b20638 /src/qml/qml/qqmlcomponent.cpp
parentd800f18d86895fcd6937d98b4be85e3829cf5638 (diff)
Qml: replace 'foreach' with 'range for'
Not all, just instances with low risk. Change-Id: Ie6b4530f748e04ccb90e7ef23415a91d6c377417 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 5a440bdaf4..41f804f0ae 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -376,7 +376,7 @@ QQmlComponent::~QQmlComponent()
if (isError()) {
qWarning() << "This may have been caused by one of the following errors:";
- foreach (const QQmlError &error, d->state.errors)
+ for (const QQmlError &error : qAsConst(d->state.errors))
qWarning().nospace().noquote() << QLatin1String(" ") << error;
}
@@ -709,7 +709,7 @@ QString QQmlComponent::errorString() const
QString ret;
if(!isError())
return ret;
- foreach(const QQmlError &e, d->state.errors) {
+ for (const QQmlError &e : d->state.errors) {
ret += e.url().toString() + QLatin1Char(':') +
QString::number(e.line()) + QLatin1Char(' ') +
e.description() + QLatin1Char('\n');