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 <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Ulf Hermann
2018-07-09 12:42:54 +02:00
parent 7442790934
commit 126030d079

View File

@@ -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});
}