forked from qt-creator/qt-creator
Debugger: Keep expansion state when stepping in QML
Change-Id: I88c87c040fe276a4436d398ba777b98b6732f37a Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -2391,6 +2391,7 @@ void QmlEnginePrivate::insertSubItems(WatchItem *parent, const QVariantList &pro
|
|||||||
QTC_ASSERT(parent, return);
|
QTC_ASSERT(parent, return);
|
||||||
LookupItems itemsToLookup;
|
LookupItems itemsToLookup;
|
||||||
|
|
||||||
|
const QSet<QString> expandedINames = engine->watchHandler()->expandedINames();
|
||||||
foreach (const QVariant &property, properties) {
|
foreach (const QVariant &property, properties) {
|
||||||
QmlV8ObjectData propertyData = extractData(property);
|
QmlV8ObjectData propertyData = extractData(property);
|
||||||
auto item = new WatchItem;
|
auto item = new WatchItem;
|
||||||
@@ -2412,7 +2413,7 @@ void QmlEnginePrivate::insertSubItems(WatchItem *parent, const QVariantList &pro
|
|||||||
item->id = propertyData.handle;
|
item->id = propertyData.handle;
|
||||||
item->type = propertyData.type;
|
item->type = propertyData.type;
|
||||||
item->value = propertyData.value.toString();
|
item->value = propertyData.value.toString();
|
||||||
if (item->type.isEmpty())
|
if (item->type.isEmpty() || expandedINames.contains(item->iname))
|
||||||
itemsToLookup.insert(propertyData.handle, {item->iname, item->name, item->exp});
|
itemsToLookup.insert(propertyData.handle, {item->iname, item->name, item->exp});
|
||||||
item->setHasChildren(propertyData.properties.count() > 0);
|
item->setHasChildren(propertyData.properties.count() > 0);
|
||||||
parent->appendChild(item);
|
parent->appendChild(item);
|
||||||
|
Reference in New Issue
Block a user