From 610711724b46d8be2eeaa262c6d6f464c6604572 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Thu, 16 Sep 2010 13:16:47 +0200
Subject: [PATCH] Inspector: Rename QmlJSDesignDebugClient to
 QmlJsObserverClient

Unify terminology somewhat.
---
 .../qmljsinspector/qmljsclientproxy.cpp       |  4 +-
 src/plugins/qmljsinspector/qmljsclientproxy.h |  4 +-
 src/plugins/qmljsinspector/qmljsinspector.pro |  4 +-
 ...ebugclient.cpp => qmljsobserverclient.cpp} | 40 +++++++++----------
 ...igndebugclient.h => qmljsobserverclient.h} |  4 +-
 5 files changed, 28 insertions(+), 28 deletions(-)
 rename src/plugins/qmljsinspector/{qmljsdesigndebugclient.cpp => qmljsobserverclient.cpp} (85%)
 rename src/plugins/qmljsinspector/{qmljsdesigndebugclient.h => qmljsobserverclient.h} (96%)

diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp
index 33765aae231..fca7bb4fe0c 100644
--- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp
+++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp
@@ -29,7 +29,7 @@
 
 #include "qmljsclientproxy.h"
 #include "qmljsprivateapi.h"
-#include "qmljsdesigndebugclient.h"
+#include "qmljsobserverclient.h"
 #include "qmljsinspector.h"
 
 #include <debugger/debuggerplugin.h>
@@ -64,7 +64,7 @@ ClientProxy::ClientProxy(Debugger::QmlAdapter *adapter, QObject *parent)
 
 void ClientProxy::connectToServer()
 {
-    m_designClient = new QmlJSDesignDebugClient(m_adapter->connection(), this);
+    m_designClient = new QmlJSObserverClient(m_adapter->connection(), this);
     emit connected();
 
     connect(m_designClient, SIGNAL(currentObjectsChanged(QList<int>)),
diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.h b/src/plugins/qmljsinspector/qmljsclientproxy.h
index 88c1771537d..1c7c2162f66 100644
--- a/src/plugins/qmljsinspector/qmljsclientproxy.h
+++ b/src/plugins/qmljsinspector/qmljsclientproxy.h
@@ -47,7 +47,7 @@ typedef QHash<QPair<QString, int>, QHash<QPair<int, int>, QList<int> > > DebugId
 namespace Internal {
 
 class InspectorPlugin;
-class QmlJSDesignDebugClient;
+class QmlJSObserverClient;
 
 class ClientProxy : public QObject
 {
@@ -147,7 +147,7 @@ private:
 
     Debugger::QmlAdapter *m_adapter;
     QDeclarativeEngineDebug *m_client;
-    QmlJSDesignDebugClient *m_designClient;
+    QmlJSObserverClient *m_designClient;
 
     QDeclarativeDebugEnginesQuery *m_engineQuery;
     QDeclarativeDebugRootContextQuery *m_contextQuery;
diff --git a/src/plugins/qmljsinspector/qmljsinspector.pro b/src/plugins/qmljsinspector/qmljsinspector.pro
index 27eaeaf3b29..3ae7bab149d 100644
--- a/src/plugins/qmljsinspector/qmljsinspector.pro
+++ b/src/plugins/qmljsinspector/qmljsinspector.pro
@@ -16,7 +16,7 @@ qmljsinspector.h \
 qmlinspectortoolbar.h \
 qmljslivetextpreview.h \
 qmljstoolbarcolorbox.h \
-qmljsdesigndebugclient.h \
+qmljsobserverclient.h \
 qmljscontextcrumblepath.h \
 qmljsinspectorsettings.h \
 qmljsobjecttree.h
@@ -28,7 +28,7 @@ qmljsinspector.cpp \
 qmlinspectortoolbar.cpp \
 qmljslivetextpreview.cpp \
 qmljstoolbarcolorbox.cpp \
-qmljsdesigndebugclient.cpp \
+qmljsobserverclient.cpp \
 qmljscontextcrumblepath.cpp \
 qmljsinspectorsettings.cpp \
 qmljsobjecttree.cpp
diff --git a/src/plugins/qmljsinspector/qmljsdesigndebugclient.cpp b/src/plugins/qmljsinspector/qmljsobserverclient.cpp
similarity index 85%
rename from src/plugins/qmljsinspector/qmljsdesigndebugclient.cpp
rename to src/plugins/qmljsinspector/qmljsobserverclient.cpp
index 38d4c979d1e..2670008ad65 100644
--- a/src/plugins/qmljsinspector/qmljsdesigndebugclient.cpp
+++ b/src/plugins/qmljsinspector/qmljsobserverclient.cpp
@@ -39,7 +39,7 @@
 **
 ****************************************************************************/
 
-#include "qmljsdesigndebugclient.h"
+#include "qmljsobserverclient.h"
 #include "qmljsclientproxy.h"
 #include "qmljsinspectorconstants.h"
 
@@ -48,7 +48,7 @@
 namespace QmlJSInspector {
 namespace Internal {
 
-QmlJSDesignDebugClient::QmlJSDesignDebugClient(QDeclarativeDebugConnection *client,
+QmlJSObserverClient::QmlJSObserverClient(QDeclarativeDebugConnection *client,
                                                              QObject * /*parent*/)
     : QDeclarativeDebugClient(QLatin1String("QDeclarativeObserverMode"), client) ,
     m_connection(client)
@@ -56,7 +56,7 @@ QmlJSDesignDebugClient::QmlJSDesignDebugClient(QDeclarativeDebugConnection *clie
     setEnabled(true);
 }
 
-void QmlJSDesignDebugClient::messageReceived(const QByteArray &message)
+void QmlJSObserverClient::messageReceived(const QByteArray &message)
 {
     QDataStream ds(message);
 
@@ -111,12 +111,12 @@ void QmlJSDesignDebugClient::messageReceived(const QByteArray &message)
     }
 }
 
-QList<int> QmlJSDesignDebugClient::selectedItemIds() const
+QList<int> QmlJSObserverClient::selectedItemIds() const
 {
     return m_selectedItemIds;
 }
 
-void QmlJSDesignDebugClient::setSelectedItemsByObjectId(const QList<QDeclarativeDebugObjectReference> &objects)
+void QmlJSObserverClient::setSelectedItemsByObjectId(const QList<QDeclarativeDebugObjectReference> &objects)
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -143,7 +143,7 @@ void recurseObjectIdList(const QDeclarativeDebugObjectReference &ref, QList<int>
     }
 }
 
-void QmlJSDesignDebugClient::setObjectIdList(const QList<QDeclarativeDebugObjectReference> &objectRoots)
+void QmlJSObserverClient::setObjectIdList(const QList<QDeclarativeDebugObjectReference> &objectRoots)
 {
     QByteArray message;
     QDataStream ds(&message, QIODevice::WriteOnly);
@@ -167,7 +167,7 @@ void QmlJSDesignDebugClient::setObjectIdList(const QList<QDeclarativeDebugObject
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::setContextPathIndex(int contextPathIndex)
+void QmlJSObserverClient::setContextPathIndex(int contextPathIndex)
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -180,7 +180,7 @@ void QmlJSDesignDebugClient::setContextPathIndex(int contextPathIndex)
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::clearComponentCache()
+void QmlJSObserverClient::clearComponentCache()
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -192,7 +192,7 @@ void QmlJSDesignDebugClient::clearComponentCache()
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::reloadViewer()
+void QmlJSObserverClient::reloadViewer()
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -204,7 +204,7 @@ void QmlJSDesignDebugClient::reloadViewer()
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::setDesignModeBehavior(bool inDesignMode)
+void QmlJSObserverClient::setDesignModeBehavior(bool inDesignMode)
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -218,7 +218,7 @@ void QmlJSDesignDebugClient::setDesignModeBehavior(bool inDesignMode)
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::setAnimationSpeed(qreal slowdownFactor)
+void QmlJSObserverClient::setAnimationSpeed(qreal slowdownFactor)
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -231,7 +231,7 @@ void QmlJSDesignDebugClient::setAnimationSpeed(qreal slowdownFactor)
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::changeToColorPickerTool()
+void QmlJSObserverClient::changeToColorPickerTool()
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -244,7 +244,7 @@ void QmlJSDesignDebugClient::changeToColorPickerTool()
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::changeToSelectTool()
+void QmlJSObserverClient::changeToSelectTool()
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -257,7 +257,7 @@ void QmlJSDesignDebugClient::changeToSelectTool()
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::changeToSelectMarqueeTool()
+void QmlJSObserverClient::changeToSelectMarqueeTool()
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -270,7 +270,7 @@ void QmlJSDesignDebugClient::changeToSelectMarqueeTool()
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::changeToZoomTool()
+void QmlJSObserverClient::changeToZoomTool()
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -283,7 +283,7 @@ void QmlJSDesignDebugClient::changeToZoomTool()
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::createQmlObject(const QString &qmlText, int parentDebugId,
+void QmlJSObserverClient::createQmlObject(const QString &qmlText, int parentDebugId,
                                              const QStringList &imports, const QString &filename)
 {
     if (!m_connection || !m_connection->isConnected())
@@ -301,7 +301,7 @@ void QmlJSDesignDebugClient::createQmlObject(const QString &qmlText, int parentD
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::destroyQmlObject(int debugId)
+void QmlJSObserverClient::destroyQmlObject(int debugId)
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -313,7 +313,7 @@ void QmlJSDesignDebugClient::destroyQmlObject(int debugId)
     sendMessage(message);
 }
 
-void QmlJSDesignDebugClient::reparentQmlObject(int debugId, int newParent)
+void QmlJSObserverClient::reparentQmlObject(int debugId, int newParent)
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -328,7 +328,7 @@ void QmlJSDesignDebugClient::reparentQmlObject(int debugId, int newParent)
 }
 
 
-void QmlJSDesignDebugClient::applyChangesToQmlFile()
+void QmlJSObserverClient::applyChangesToQmlFile()
 {
     if (!m_connection || !m_connection->isConnected())
         return;
@@ -336,7 +336,7 @@ void QmlJSDesignDebugClient::applyChangesToQmlFile()
     // TODO
 }
 
-void QmlJSDesignDebugClient::applyChangesFromQmlFile()
+void QmlJSObserverClient::applyChangesFromQmlFile()
 {
     if (!m_connection || !m_connection->isConnected())
         return;
diff --git a/src/plugins/qmljsinspector/qmljsdesigndebugclient.h b/src/plugins/qmljsinspector/qmljsobserverclient.h
similarity index 96%
rename from src/plugins/qmljsinspector/qmljsdesigndebugclient.h
rename to src/plugins/qmljsinspector/qmljsobserverclient.h
index da252aff6c2..7928984f898 100644
--- a/src/plugins/qmljsinspector/qmljsdesigndebugclient.h
+++ b/src/plugins/qmljsinspector/qmljsobserverclient.h
@@ -47,11 +47,11 @@
 namespace QmlJSInspector {
 namespace Internal {
 
-class QmlJSDesignDebugClient : public QDeclarativeDebugClient
+class QmlJSObserverClient : public QDeclarativeDebugClient
 {
     Q_OBJECT
 public:
-    explicit QmlJSDesignDebugClient(QDeclarativeDebugConnection *client,
+    explicit QmlJSObserverClient(QDeclarativeDebugConnection *client,
                                     QObject *parent = 0);
 
     void setSelectedItemsByObjectId(const QList<QDeclarativeDebugObjectReference> &objects);
-- 
GitLab