forked from qt-creator/qt-creator
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:
@@ -2383,23 +2383,22 @@ 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;
|
|
||||||
item->exp = res.exp;
|
|
||||||
item->iname = res.iname;
|
|
||||||
item->name = res.name;
|
|
||||||
item->id = handle;
|
|
||||||
|
|
||||||
item->type = bodyObjectData.type;
|
auto item = new WatchItem;
|
||||||
item->value = bodyObjectData.value.toString();
|
item->exp = res.exp;
|
||||||
|
item->iname = res.iname;
|
||||||
|
item->name = res.name;
|
||||||
|
item->id = handle;
|
||||||
|
|
||||||
setWatchItemHasChildren(item, bodyObjectData.hasChildren());
|
item->type = bodyObjectData.type;
|
||||||
insertSubItems(item, bodyObjectData.properties);
|
item->value = bodyObjectData.value.toString();
|
||||||
|
|
||||||
engine->watchHandler()->insertItem(item);
|
setWatchItemHasChildren(item, bodyObjectData.hasChildren());
|
||||||
}
|
insertSubItems(item, bodyObjectData.properties);
|
||||||
|
|
||||||
|
engine->watchHandler()->insertItem(item);
|
||||||
}
|
}
|
||||||
checkForFinishedUpdate();
|
checkForFinishedUpdate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user