From 3b8087a85cf412013acb404a09a2eb5b319e56cb Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 10 Oct 2016 11:56:56 +0200 Subject: [PATCH] Debugger: Keep expansion state when stepping in QML Change-Id: I88c87c040fe276a4436d398ba777b98b6732f37a Reviewed-by: Eike Ziller Reviewed-by: Ulf Hermann --- src/plugins/debugger/qml/qmlengine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index bbfe86037fb..bb51ad7b5e5 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -2391,6 +2391,7 @@ void QmlEnginePrivate::insertSubItems(WatchItem *parent, const QVariantList &pro QTC_ASSERT(parent, return); LookupItems itemsToLookup; + const QSet expandedINames = engine->watchHandler()->expandedINames(); foreach (const QVariant &property, properties) { QmlV8ObjectData propertyData = extractData(property); auto item = new WatchItem; @@ -2412,7 +2413,7 @@ 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()) + if (item->type.isEmpty() || expandedINames.contains(item->iname)) itemsToLookup.insert(propertyData.handle, {item->iname, item->name, item->exp}); item->setHasChildren(propertyData.properties.count() > 0); parent->appendChild(item);