aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-11-22 13:52:14 +0100
committerUlf Hermann <ulf.hermann@qt.io>2018-11-22 14:02:11 +0000
commitba94e9eb0130a3b9d75669ee38b0af66c6d3a346 (patch)
treef69360412e303c45ca49bdbe7c943db3e869f36e /src/plugins/debugger/qml
parent0eca4bce7236241b5b3c52efd80ad72466baad04 (diff)
QML Debugger: Do fetch engine properties
The properties of the engines themselves are interesting. However, in order to properly display the engines, we need to always update the root context for an engine after we update its properties. This is a good idea anyway because there might be a reference to the engine somewhere else in the object tree, and accidentally updating the engine would clear its root context. Change-Id: If905f4c32ba37106b5620b5af0e157e19ef8b295 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/debugger/qml')
-rw-r--r--src/plugins/debugger/qml/qmlinspectoragent.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/debugger/qml/qmlinspectoragent.cpp b/src/plugins/debugger/qml/qmlinspectoragent.cpp
index 66dd51c0bde..8ef259e37c2 100644
--- a/src/plugins/debugger/qml/qmlinspectoragent.cpp
+++ b/src/plugins/debugger/qml/qmlinspectoragent.cpp
@@ -273,9 +273,9 @@ void QmlInspectorAgent::onResult(quint32 queryId, const QVariant &value,
verifyAndInsertObjectInTree(ObjectReference(engine.debugId(), name),
engine.debugId());
updateObjectTree(m_rootContexts[engine.debugId()], engine.debugId());
+ fetchObject(engine.debugId());
}
m_rootContextQueryIds.clear();
- m_rootContexts.clear();
}
}
}
@@ -378,6 +378,7 @@ void QmlInspectorAgent::queryEngineContext()
log(LogSend, "LIST_OBJECTS");
+ m_rootContexts.clear();
for (const auto &engine : qAsConst(m_engines))
m_rootContextQueryIds.append(m_engineClient->queryRootContexts(engine));
}
@@ -471,14 +472,14 @@ void QmlInspectorAgent::verifyAndInsertObjectInTree(const ObjectReference &objec
if (m_debugIdToIname.contains(parentId)) {
QString parentIname = m_debugIdToIname.value(parentId);
- if (parentId != WatchItem::InvalidId && parentId != engineId
- && !handler->isExpandedIName(parentIname)) {
+ if (parentId != WatchItem::InvalidId && !handler->isExpandedIName(parentIname)) {
m_objectStack.push(QPair<ObjectReference, int>(object, engineId));
handler->fetchMore(parentIname);
return; // recursive
}
insertObjectInTree(object, parentId);
-
+ if (objectDebugId == engineId)
+ updateObjectTree(m_rootContexts[engineId], engineId);
} else {
m_objectStack.push(QPair<ObjectReference, int>(object, engineId));
fetchObject(parentId);