Debugger: Avoid use of QHash::values(...) in QmlEngine

This will be gone in Qt6 and seems unnecessary here as insertion
into the hash explicitly checks containment first, so this was
effectively not used as QMultiHash anyway.

Change-Id: I3f6ef9473930f72ee9b5f81f3623829d63619cc0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-07-31 14:11:46 +02:00
parent 4bbf76a344
commit 78406916a3

View File

@@ -2383,9 +2383,9 @@ void QmlEnginePrivate::handleLookup(const QVariantMap &response)
for (const QString &handleString : handlesList) { for (const QString &handleString : handlesList) {
const int handle = handleString.toInt(); const int handle = handleString.toInt();
const QmlV8ObjectData bodyObjectData = extractData(body.value(handleString)); const QmlV8ObjectData bodyObjectData = extractData(body.value(handleString));
const QList<LookupData> vals = currentlyLookingUp.values(handle); const LookupData res = currentlyLookingUp.value(handle);
currentlyLookingUp.remove(handle); currentlyLookingUp.remove(handle);
for (const LookupData &res : vals) {
auto item = new WatchItem; auto item = new WatchItem;
item->exp = res.exp; item->exp = res.exp;
item->iname = res.iname; item->iname = res.iname;
@@ -2400,7 +2400,6 @@ void QmlEnginePrivate::handleLookup(const QVariantMap &response)
engine->watchHandler()->insertItem(item); engine->watchHandler()->insertItem(item);
} }
}
checkForFinishedUpdate(); checkForFinishedUpdate();
} }