QmlJSInspector: Query Root Objects

As parentIds are now known, query only root objects initially and
build the object tree lazily.

Change-Id: Ic6895ad8a0dd8dc2a2b1d8aa71fdf6766974eea5
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2012-04-10 10:36:00 +02:00
parent a7c1f55eba
commit c74458765d
3 changed files with 10 additions and 7 deletions

View File

@@ -528,7 +528,7 @@ quint32 ClientProxy::fetchContextObject(const QmlDebugObjectReference& obj)
return m_engineClient->queryObject(obj);
}
void ClientProxy::fetchContextObjectRecursive(
void ClientProxy::fetchRootObjects(
const QmlDebugContextReference& context, bool clear)
{
if (!isConnected())
@@ -541,16 +541,19 @@ void ClientProxy::fetchContextObjectRecursive(
quint32 queryId = 0;
using namespace QmlJsDebugClient::Constants;
if (m_engineClient->objectName() == QML_DEBUGGER &&
m_engineClient->serviceVersion() >= CURRENT_SUPPORTED_VERSION)
queryId = fetchContextObject(obj);
else
m_engineClient->serviceVersion() >= CURRENT_SUPPORTED_VERSION) {
//Fetch only root objects
if (obj.parentId() == -1)
queryId = fetchContextObject(obj);
} else {
queryId = m_engineClient->queryObjectRecursive(obj);
}
if (queryId)
m_objectTreeQueryIds << queryId;
}
foreach (const QmlDebugContextReference& child, context.contexts()) {
fetchContextObjectRecursive(child, false);
fetchRootObjects(child, false);
}
}