forked from qt-creator/qt-creator
QmlJSInspector: Select Items
This fixes sending SetCurrentObjects to QDeclarativeObserver when fetching the object tree. Change-Id: I03c1264d2f464faa69a946654867636bce37a437 Reviewed-by: Simjees Abraham <simjees.abraham@nokia.com> Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
@@ -186,7 +186,7 @@ void ClientProxy::onCurrentObjectsFetched(quint32 queryId, const QVariant &resul
|
||||
return;
|
||||
|
||||
foreach (const QmlDebugObjectReference &o, m_fetchCurrentObjects)
|
||||
addObjectToTree(o);
|
||||
addObjectToTree(o, false);
|
||||
emit selectedItemsChanged(QList<QmlDebugObjectReference>() <<
|
||||
m_fetchCurrentObjects.last());
|
||||
}
|
||||
@@ -230,13 +230,14 @@ void ClientProxy::setSelectedItemsByObjectId(
|
||||
}
|
||||
}
|
||||
|
||||
void ClientProxy::addObjectToTree(const QmlDebugObjectReference &obj)
|
||||
void ClientProxy::addObjectToTree(const QmlDebugObjectReference &obj, bool notify)
|
||||
{
|
||||
int count = m_rootObjects.count();
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (m_rootObjects[i].insertObjectInTree(obj)) {
|
||||
buildDebugIdHashRecursive(obj);
|
||||
emit objectTreeUpdated();
|
||||
if (notify)
|
||||
emit objectTreeUpdated();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
Debugger::QmlAdapter *qmlAdapter() const;
|
||||
|
||||
quint32 fetchContextObject(const QmlDebugObjectReference& obj);
|
||||
void addObjectToTree(const QmlDebugObjectReference &obj);
|
||||
void addObjectToTree(const QmlDebugObjectReference &obj, bool notify = true);
|
||||
void fetchRootObjects(const QmlDebugContextReference &context, bool clear);
|
||||
void insertObjectInTreeIfNeeded(const QmlDebugObjectReference &object);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user