Commit 63d182f0 authored by hjk's avatar hjk
Browse files

Debugger: Fix retrieval of Locals Views subitems in QML debugger

Previously, only the first level of properties was expanded,
properties of object type could not be expanded further.

This can be reproduced by opening the SameGame example,
putting and triggering a breakpoint at startNewGame(),
expanding the 'this' entry in the Locals view and checking
the 'component' subentry.

Change-Id: I6cf714af697ab4eebd7eb0ae0ea37e516b3ea635
Reviewed-by: default avatarRobert Loehning <>
Reviewed-by: default avatarUlf Hermann <>
parent 5e553376
......@@ -2353,6 +2353,8 @@ ConsoleItem *QmlEnginePrivate::constructLogItemTree(ConsoleItem *parent,
void QmlEnginePrivate::insertSubItems(WatchItem *parent, const QVariantList &properties)
QTC_ASSERT(parent, return);
LookupItems itemsToLookup;
foreach (const QVariant &property, properties) {
QmlV8ObjectData propertyData = extractData(property);
auto item = new WatchItem;
......@@ -2374,15 +2376,20 @@ void QmlEnginePrivate::insertSubItems(WatchItem *parent, const QVariantList &pro
item->id = propertyData.handle;
item->type = propertyData.type;
item->value = propertyData.value.toString();
if (item->type.isEmpty())
itemsToLookup.insert(propertyData.handle, {item->iname, item->name});
item->setHasChildren( > 0);
if (boolSetting(SortStructMembers))
if (boolSetting(SortStructMembers)) {
parent->sortChildren([](const TreeItem *item1, const TreeItem *item2) -> bool {
return static_cast<const WatchItem *>(item1)->name
< static_cast<const WatchItem *>(item2)->name;
< static_cast<const WatchItem *>(item2)->name;
void QmlEnginePrivate::handleExecuteDebuggerCommand(const QVariantMap &response)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment