diff options
author | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2016-05-11 22:06:28 +0200 |
---|---|---|
committer | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2016-05-13 10:11:54 +0000 |
commit | 5241bcecea1b357dfe614346ae58e78ffd9578f8 (patch) | |
tree | b51858b938840c4ed37fb95ae658d3f23931c522 /src/qml/qml/qqmlmetatype.cpp | |
parent | 174996a45633c5440b9707856fb8bea95b8330c2 (diff) |
Make this loop more readable with a range-for
Change-Id: I867652aa168bd4a3eae191bf09946f98207a5ba6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlmetatype.cpp')
-rw-r--r-- | src/qml/qml/qqmlmetatype.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 13ec492c54..1c5a7ad8c1 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -1926,9 +1926,9 @@ const QQmlPrivate::CachedQmlUnit *QQmlMetaType::findCachedCompilationUnit(const { QMutexLocker lock(metaTypeDataLock()); QQmlMetaTypeData *data = metaTypeData(); - for (QVector<QQmlPrivate::QmlUnitCacheLookupFunction>::ConstIterator it = data->lookupCachedQmlUnit.constBegin(), end = data->lookupCachedQmlUnit.constEnd(); - it != end; ++it) { - if (const QQmlPrivate::CachedQmlUnit *unit = (*it)(uri)) + + for (const auto lookup : qAsConst(data->lookupCachedQmlUnit)) { + if (const QQmlPrivate::CachedQmlUnit *unit = lookup(uri)) return unit; } return 0; |