aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-01 20:07:26 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-04 12:31:23 +0200
commit1289bd6045818249915028fb345ec29c4ead52e5 (patch)
treeb249178edd73dbb0326bb17e774d4fc3b75d4b7f /src/plugins
parentd425848d0c09c49a734d1832e3a9f8e6fa12541b (diff)
Eradicate Java-style iterators and mark the module free of them
Java-style iterators are scheduled to be deprecated, or at the very least banned from use in Qt's own implementation. Change-Id: I6a1aeceb22dfa13c4ed7443296455b60abed7d67 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
index 4c104f01de..d0f9833c2e 100644
--- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
+++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
@@ -233,11 +233,9 @@ QVariant QQmlEngineDebugServiceImpl::valueContents(QVariant value) const
if (value.type() == QVariant::Map) {
QVariantMap contents;
- QMapIterator<QString, QVariant> i(value.toMap());
- while (i.hasNext()) {
- i.next();
+ const auto map = value.toMap();
+ for (auto i = map.cbegin(), end = map.cend(); i != end; ++i)
contents.insert(i.key(), valueContents(i.value()));
- }
return contents;
}