Skip to content
Snippets Groups Projects
Commit 0b09a59e authored by Olivier Goffart's avatar Olivier Goffart
Browse files

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

parent f2d25d47
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......@@ -161,7 +161,7 @@ void ClientProxy::onCurrentObjectsChanged(const QList<int> &debugIds)
// b) add children to part of an existing tree.
// So the only choice that remains is to update the complete
// tree when we have an unknown debug id.
if (!m_objectTreeQuery)
if (!m_objectTreeQuery && requestIfNeeded)
m_objectTreeQuery = m_client->queryObjectRecursive(m_rootObject, this);
break;
}
......@@ -335,7 +335,7 @@ void ClientProxy::objectTreeFetched(QDeclarativeDebugQuery::State state)
if (isDesignClientConnected()) {
if (!m_designClient->selectedItemIds().isEmpty())
onCurrentObjectsChanged(m_designClient->selectedItemIds());
onCurrentObjectsChanged(m_designClient->selectedItemIds(), false);
m_designClient->setObjectIdList(QList<QDeclarativeDebugObjectReference>() << m_rootObject);
}
......
......@@ -121,7 +121,7 @@ private slots:
void contextChanged();
void onCurrentObjectsChanged(const QList<int> &debugIds);
void onCurrentObjectsChanged(const QList<int> &debugIds, bool requestIfNeeded = true);
void updateEngineList();
void objectTreeFetched(QDeclarativeDebugQuery::State state = QDeclarativeDebugQuery::Completed);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment