From 5241bcecea1b357dfe614346ae58e78ffd9578f8 Mon Sep 17 00:00:00 2001 From: Frank Meerkoetter Date: Wed, 11 May 2016 22:06:28 +0200 Subject: Make this loop more readable with a range-for Change-Id: I867652aa168bd4a3eae191bf09946f98207a5ba6 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlmetatype.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/qml/qqmlmetatype.cpp') 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::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; -- cgit v1.2.3