From 126030d079b7309a9487cd4138e40da49e617341 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 9 Jul 2018 12:42:54 +0200 Subject: [PATCH] QML Debugger: Make sure to re-fetch expanded properties on update If an expanded object is updated we typically just get the ref for it. If we leave the tree item at "wantsChildren", the debugger will think that the update fails and "adjust" the "child expectation" to none. Fetching the children right away takes care of this. Task-number: QTCREATORBUG-20736 Change-Id: I1b3725e7106a563198962915cbcab8f68ef741a6 Reviewed-by: hjk Reviewed-by: Eike Ziller --- src/plugins/debugger/qml/qmlengine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index b489de57541..9f5a30315fa 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -2247,7 +2247,10 @@ void QmlEnginePrivate::handleScope(const QVariantMap &response) item->setHasChildren(localData.hasChildren()); if (localData.value.isValid() || item->wantsChildren || localData.expectedProperties == 0) { - engine->watchHandler()->insertItem(item.release()); + WatchHandler *watchHander = engine->watchHandler(); + if (watchHander->isExpandedIName(item->iname)) + itemsToLookup.insert(int(item->id), {item->iname, item->name, item->exp}); + watchHander->insertItem(item.release()); } else { itemsToLookup.insert(int(item->id), {item->iname, item->name, item->exp}); }