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,23 +2383,22 @@ void QmlEnginePrivate::handleLookup(const QVariantMap &response)
for (const QString &handleString : handlesList) {
const int handle = handleString.toInt();
const QmlV8ObjectData bodyObjectData = extractData(body.value(handleString));
const QList<LookupData> vals = currentlyLookingUp.values(handle);
const LookupData res = currentlyLookingUp.value(handle);
currentlyLookingUp.remove(handle);
for (const LookupData &res : vals) {
auto item = new WatchItem;
item->exp = res.exp;
item->iname = res.iname;
item->name = res.name;
item->id = handle;
item->type = bodyObjectData.type;
item->value = bodyObjectData.value.toString();
auto item = new WatchItem;
item->exp = res.exp;
item->iname = res.iname;
item->name = res.name;
item->id = handle;
setWatchItemHasChildren(item, bodyObjectData.hasChildren());
insertSubItems(item, bodyObjectData.properties);
item->type = bodyObjectData.type;
item->value = bodyObjectData.value.toString();
engine->watchHandler()->insertItem(item);
}
setWatchItemHasChildren(item, bodyObjectData.hasChildren());
insertSubItems(item, bodyObjectData.properties);
engine->watchHandler()->insertItem(item);
}
checkForFinishedUpdate();
}