diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp index bf8969f3576264cf8d06dd990a2f687e58a1f857..d1d171e60f4e6c06da8960057028e76d07558394 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp +++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp @@ -163,7 +163,7 @@ void ClientProxy::refreshObjectTree() } } -void ClientProxy::onCurrentObjectsChanged(const QList< int >& debugIds, bool requestIfNeeded) +void ClientProxy::onCurrentObjectsChanged(const QList<int> &debugIds, bool requestIfNeeded) { QList<QDeclarativeDebugObjectReference> selectedItems; @@ -194,7 +194,7 @@ void ClientProxy::setSelectedItemsByObjectId(const QList<QDeclarativeDebugObject debugIds << ref.debugId(); } - m_designClient->setSelectedItemsByObjectId(debugIds); + m_designClient->setCurrentObjects(debugIds); } } @@ -401,8 +401,8 @@ void ClientProxy::objectTreeFetched(QDeclarativeDebugQuery::State state) emit objectTreeUpdated(); if (isConnected()) { - if (!m_designClient->selectedItemIds().isEmpty()) - onCurrentObjectsChanged(m_designClient->selectedItemIds(), false); + if (!m_designClient->currentObjects().isEmpty()) + onCurrentObjectsChanged(m_designClient->currentObjects(), false); m_designClient->setObjectIdList(m_rootObjects); } diff --git a/src/plugins/qmljsinspector/qmljsinspector.cpp b/src/plugins/qmljsinspector/qmljsinspector.cpp index a9a391dbf2d90d4e9ca9dbc8b220957b3b85ee08..e2ce80200834520119e6ee4541fa9c4ec50b8db2 100644 --- a/src/plugins/qmljsinspector/qmljsinspector.cpp +++ b/src/plugins/qmljsinspector/qmljsinspector.cpp @@ -276,7 +276,7 @@ void InspectorUi::connected(ClientProxy *clientProxy) { m_clientProxy = clientProxy; - connect(m_clientProxy, SIGNAL(selectedItemsChanged(QList<QDeclarativeDebugObjectReference>)), + connect(m_clientProxy, SIGNAL(currentObjectsChanged(QList<QDeclarativeDebugObjectReference>)), SLOT(setSelectedItemsByObjectReference(QList<QDeclarativeDebugObjectReference>))); connect(m_clientProxy, SIGNAL(enginesChanged()), SLOT(updateEngineList())); @@ -309,7 +309,7 @@ void InspectorUi::connected(ClientProxy *clientProxy) void InspectorUi::disconnected() { - disconnect(m_clientProxy, SIGNAL(selectedItemsChanged(QList<QDeclarativeDebugObjectReference>)), + disconnect(m_clientProxy, SIGNAL(currentObjectsChanged(QList<QDeclarativeDebugObjectReference>)), this, SLOT(setSelectedItemsByObjectReference(QList<QDeclarativeDebugObjectReference>))); disconnect(m_clientProxy, SIGNAL(enginesChanged()), this, SLOT(updateEngineList())); @@ -431,7 +431,7 @@ QmlJSLiveTextPreview *InspectorUi::createPreviewForEditor(Core::IEditor *newEdit } else { preview = new QmlJSLiveTextPreview(doc, initdoc, m_clientProxy, this); connect(preview, - SIGNAL(selectedItemsChanged(QList<QDeclarativeDebugObjectReference>)), + SIGNAL(currentObjectsChanged(QList<QDeclarativeDebugObjectReference>)), SLOT(changeSelectedItems(QList<QDeclarativeDebugObjectReference>))); connect(preview, SIGNAL(reloadQmlViewerRequested()), m_clientProxy, SLOT(reloadQmlViewer())); connect(preview, SIGNAL(disableLivePreviewRequested()), SLOT(disableLivePreview())); diff --git a/src/plugins/qmljsinspector/qmljsobserverclient.cpp b/src/plugins/qmljsinspector/qmljsobserverclient.cpp index 525ce233567a957a66dc1094cca326a843f5d829..7b9719dc2e3ee803bb284d9d52420df11eb9529e 100644 --- a/src/plugins/qmljsinspector/qmljsobserverclient.cpp +++ b/src/plugins/qmljsinspector/qmljsobserverclient.cpp @@ -75,17 +75,17 @@ void QmlJSObserverClient::messageReceived(const QByteArray &message) int objectCount; ds >> objectCount; - m_selectedItemIds.clear(); + m_currentDebugIds.clear(); for(int i = 0; i < objectCount; ++i) { int debugId; ds >> debugId; if (debugId != -1) { - m_selectedItemIds << debugId; + m_currentDebugIds << debugId; } } - emit currentObjectsChanged(m_selectedItemIds); + emit currentObjectsChanged(m_currentDebugIds); } else if (type == "TOOL_CHANGED") { int toolId; ds >> toolId; @@ -120,12 +120,12 @@ void QmlJSObserverClient::messageReceived(const QByteArray &message) } } -QList<int> QmlJSObserverClient::selectedItemIds() const +QList<int> QmlJSObserverClient::currentObjects() const { - return m_selectedItemIds; + return m_currentDebugIds; } -void QmlJSObserverClient::setSelectedItemsByObjectId(const QList<int> &debugIds) { +void QmlJSObserverClient::setCurrentObjects(const QList<int> &debugIds) { if (!m_connection || !m_connection->isConnected()) return; diff --git a/src/plugins/qmljsinspector/qmljsobserverclient.h b/src/plugins/qmljsinspector/qmljsobserverclient.h index 8ffdbf644907446dc0630f01a80b9b308047f6cf..1e87bf94d3e2885e8226e2bf39e290d0cd05587f 100644 --- a/src/plugins/qmljsinspector/qmljsobserverclient.h +++ b/src/plugins/qmljsinspector/qmljsobserverclient.h @@ -54,7 +54,7 @@ public: explicit QmlJSObserverClient(QDeclarativeDebugConnection *client, QObject *parent = 0); - void setSelectedItemsByObjectId(const QList<int> &debugIds); + void setCurrentObjects(const QList<int> &debugIds); void reloadViewer(); void setDesignModeBehavior(bool inDesignMode); void setAnimationSpeed(qreal slowdownFactor); @@ -71,7 +71,7 @@ public: void applyChangesToQmlFile(); void applyChangesFromQmlFile(); - QList<int> selectedItemIds() const; + QList<int> currentObjects() const; // ### Qt 4.8: remove if we can have access to qdeclarativecontextdata or id's void setObjectIdList(const QList<QDeclarativeDebugObjectReference> &objectRoots); @@ -98,7 +98,7 @@ protected: virtual void messageReceived(const QByteArray &); private: - QList<int> m_selectedItemIds; + QList<int> m_currentDebugIds; QDeclarativeDebugConnection *m_connection; };