Commit c51b2810 authored by Aurindam Jana's avatar Aurindam Jana
Browse files

QmlJSInspector: Select Items



This fixes sending SetCurrentObjects to QDeclarativeObserver
when fetching the object tree.

Change-Id: I03c1264d2f464faa69a946654867636bce37a437
Reviewed-by: default avatarSimjees Abraham <simjees.abraham@nokia.com>
Reviewed-by: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent 6b8167c6
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment