QML Debugger: Avoid infinite recursion if one can't find a debug id

This commit is contained in:
Olivier Goffart
2010-08-18 15:28:39 +02:00
parent f2d25d4710
commit 0b09a59ef2
2 changed files with 4 additions and 4 deletions

View File

@@ -146,7 +146,7 @@ void ClientProxy::refreshObjectTree()
} }
} }
void ClientProxy::onCurrentObjectsChanged(const QList<int> &debugIds) void ClientProxy::onCurrentObjectsChanged(const QList< int >& debugIds, bool requestIfNeeded)
{ {
QList<QDeclarativeDebugObjectReference> selectedItems; QList<QDeclarativeDebugObjectReference> selectedItems;
@@ -161,7 +161,7 @@ void ClientProxy::onCurrentObjectsChanged(const QList<int> &debugIds)
// b) add children to part of an existing tree. // b) add children to part of an existing tree.
// So the only choice that remains is to update the complete // So the only choice that remains is to update the complete
// tree when we have an unknown debug id. // tree when we have an unknown debug id.
if (!m_objectTreeQuery) if (!m_objectTreeQuery && requestIfNeeded)
m_objectTreeQuery = m_client->queryObjectRecursive(m_rootObject, this); m_objectTreeQuery = m_client->queryObjectRecursive(m_rootObject, this);
break; break;
} }
@@ -335,7 +335,7 @@ void ClientProxy::objectTreeFetched(QDeclarativeDebugQuery::State state)
if (isDesignClientConnected()) { if (isDesignClientConnected()) {
if (!m_designClient->selectedItemIds().isEmpty()) if (!m_designClient->selectedItemIds().isEmpty())
onCurrentObjectsChanged(m_designClient->selectedItemIds()); onCurrentObjectsChanged(m_designClient->selectedItemIds(), false);
m_designClient->setObjectIdList(QList<QDeclarativeDebugObjectReference>() << m_rootObject); m_designClient->setObjectIdList(QList<QDeclarativeDebugObjectReference>() << m_rootObject);
} }

View File

@@ -121,7 +121,7 @@ private slots:
void contextChanged(); void contextChanged();
void onCurrentObjectsChanged(const QList<int> &debugIds); void onCurrentObjectsChanged(const QList<int> &debugIds, bool requestIfNeeded = true);
void updateEngineList(); void updateEngineList();
void objectTreeFetched(QDeclarativeDebugQuery::State state = QDeclarativeDebugQuery::Completed); void objectTreeFetched(QDeclarativeDebugQuery::State state = QDeclarativeDebugQuery::Completed);