forked from qt-creator/qt-creator
Inspector: Rename QmlJSDesignDebugClient to QmlJsObserverClient
Unify terminology somewhat.
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
#include "qmljsclientproxy.h"
|
#include "qmljsclientproxy.h"
|
||||||
#include "qmljsprivateapi.h"
|
#include "qmljsprivateapi.h"
|
||||||
#include "qmljsdesigndebugclient.h"
|
#include "qmljsobserverclient.h"
|
||||||
#include "qmljsinspector.h"
|
#include "qmljsinspector.h"
|
||||||
|
|
||||||
#include <debugger/debuggerplugin.h>
|
#include <debugger/debuggerplugin.h>
|
||||||
@@ -64,7 +64,7 @@ ClientProxy::ClientProxy(Debugger::QmlAdapter *adapter, QObject *parent)
|
|||||||
|
|
||||||
void ClientProxy::connectToServer()
|
void ClientProxy::connectToServer()
|
||||||
{
|
{
|
||||||
m_designClient = new QmlJSDesignDebugClient(m_adapter->connection(), this);
|
m_designClient = new QmlJSObserverClient(m_adapter->connection(), this);
|
||||||
emit connected();
|
emit connected();
|
||||||
|
|
||||||
connect(m_designClient, SIGNAL(currentObjectsChanged(QList<int>)),
|
connect(m_designClient, SIGNAL(currentObjectsChanged(QList<int>)),
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ typedef QHash<QPair<QString, int>, QHash<QPair<int, int>, QList<int> > > DebugId
|
|||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class InspectorPlugin;
|
class InspectorPlugin;
|
||||||
class QmlJSDesignDebugClient;
|
class QmlJSObserverClient;
|
||||||
|
|
||||||
class ClientProxy : public QObject
|
class ClientProxy : public QObject
|
||||||
{
|
{
|
||||||
@@ -147,7 +147,7 @@ private:
|
|||||||
|
|
||||||
Debugger::QmlAdapter *m_adapter;
|
Debugger::QmlAdapter *m_adapter;
|
||||||
QDeclarativeEngineDebug *m_client;
|
QDeclarativeEngineDebug *m_client;
|
||||||
QmlJSDesignDebugClient *m_designClient;
|
QmlJSObserverClient *m_designClient;
|
||||||
|
|
||||||
QDeclarativeDebugEnginesQuery *m_engineQuery;
|
QDeclarativeDebugEnginesQuery *m_engineQuery;
|
||||||
QDeclarativeDebugRootContextQuery *m_contextQuery;
|
QDeclarativeDebugRootContextQuery *m_contextQuery;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ qmljsinspector.h \
|
|||||||
qmlinspectortoolbar.h \
|
qmlinspectortoolbar.h \
|
||||||
qmljslivetextpreview.h \
|
qmljslivetextpreview.h \
|
||||||
qmljstoolbarcolorbox.h \
|
qmljstoolbarcolorbox.h \
|
||||||
qmljsdesigndebugclient.h \
|
qmljsobserverclient.h \
|
||||||
qmljscontextcrumblepath.h \
|
qmljscontextcrumblepath.h \
|
||||||
qmljsinspectorsettings.h \
|
qmljsinspectorsettings.h \
|
||||||
qmljsobjecttree.h
|
qmljsobjecttree.h
|
||||||
@@ -28,7 +28,7 @@ qmljsinspector.cpp \
|
|||||||
qmlinspectortoolbar.cpp \
|
qmlinspectortoolbar.cpp \
|
||||||
qmljslivetextpreview.cpp \
|
qmljslivetextpreview.cpp \
|
||||||
qmljstoolbarcolorbox.cpp \
|
qmljstoolbarcolorbox.cpp \
|
||||||
qmljsdesigndebugclient.cpp \
|
qmljsobserverclient.cpp \
|
||||||
qmljscontextcrumblepath.cpp \
|
qmljscontextcrumblepath.cpp \
|
||||||
qmljsinspectorsettings.cpp \
|
qmljsinspectorsettings.cpp \
|
||||||
qmljsobjecttree.cpp
|
qmljsobjecttree.cpp
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qmljsdesigndebugclient.h"
|
#include "qmljsobserverclient.h"
|
||||||
#include "qmljsclientproxy.h"
|
#include "qmljsclientproxy.h"
|
||||||
#include "qmljsinspectorconstants.h"
|
#include "qmljsinspectorconstants.h"
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
namespace QmlJSInspector {
|
namespace QmlJSInspector {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
QmlJSDesignDebugClient::QmlJSDesignDebugClient(QDeclarativeDebugConnection *client,
|
QmlJSObserverClient::QmlJSObserverClient(QDeclarativeDebugConnection *client,
|
||||||
QObject * /*parent*/)
|
QObject * /*parent*/)
|
||||||
: QDeclarativeDebugClient(QLatin1String("QDeclarativeObserverMode"), client) ,
|
: QDeclarativeDebugClient(QLatin1String("QDeclarativeObserverMode"), client) ,
|
||||||
m_connection(client)
|
m_connection(client)
|
||||||
@@ -56,7 +56,7 @@ QmlJSDesignDebugClient::QmlJSDesignDebugClient(QDeclarativeDebugConnection *clie
|
|||||||
setEnabled(true);
|
setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::messageReceived(const QByteArray &message)
|
void QmlJSObserverClient::messageReceived(const QByteArray &message)
|
||||||
{
|
{
|
||||||
QDataStream ds(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;
|
return m_selectedItemIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::setSelectedItemsByObjectId(const QList<QDeclarativeDebugObjectReference> &objects)
|
void QmlJSObserverClient::setSelectedItemsByObjectId(const QList<QDeclarativeDebugObjectReference> &objects)
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
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;
|
QByteArray message;
|
||||||
QDataStream ds(&message, QIODevice::WriteOnly);
|
QDataStream ds(&message, QIODevice::WriteOnly);
|
||||||
@@ -167,7 +167,7 @@ void QmlJSDesignDebugClient::setObjectIdList(const QList<QDeclarativeDebugObject
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::setContextPathIndex(int contextPathIndex)
|
void QmlJSObserverClient::setContextPathIndex(int contextPathIndex)
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -180,7 +180,7 @@ void QmlJSDesignDebugClient::setContextPathIndex(int contextPathIndex)
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::clearComponentCache()
|
void QmlJSObserverClient::clearComponentCache()
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -192,7 +192,7 @@ void QmlJSDesignDebugClient::clearComponentCache()
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::reloadViewer()
|
void QmlJSObserverClient::reloadViewer()
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -204,7 +204,7 @@ void QmlJSDesignDebugClient::reloadViewer()
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::setDesignModeBehavior(bool inDesignMode)
|
void QmlJSObserverClient::setDesignModeBehavior(bool inDesignMode)
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -218,7 +218,7 @@ void QmlJSDesignDebugClient::setDesignModeBehavior(bool inDesignMode)
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::setAnimationSpeed(qreal slowdownFactor)
|
void QmlJSObserverClient::setAnimationSpeed(qreal slowdownFactor)
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -231,7 +231,7 @@ void QmlJSDesignDebugClient::setAnimationSpeed(qreal slowdownFactor)
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::changeToColorPickerTool()
|
void QmlJSObserverClient::changeToColorPickerTool()
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -244,7 +244,7 @@ void QmlJSDesignDebugClient::changeToColorPickerTool()
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::changeToSelectTool()
|
void QmlJSObserverClient::changeToSelectTool()
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -257,7 +257,7 @@ void QmlJSDesignDebugClient::changeToSelectTool()
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::changeToSelectMarqueeTool()
|
void QmlJSObserverClient::changeToSelectMarqueeTool()
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -270,7 +270,7 @@ void QmlJSDesignDebugClient::changeToSelectMarqueeTool()
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::changeToZoomTool()
|
void QmlJSObserverClient::changeToZoomTool()
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -283,7 +283,7 @@ void QmlJSDesignDebugClient::changeToZoomTool()
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::createQmlObject(const QString &qmlText, int parentDebugId,
|
void QmlJSObserverClient::createQmlObject(const QString &qmlText, int parentDebugId,
|
||||||
const QStringList &imports, const QString &filename)
|
const QStringList &imports, const QString &filename)
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
@@ -301,7 +301,7 @@ void QmlJSDesignDebugClient::createQmlObject(const QString &qmlText, int parentD
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::destroyQmlObject(int debugId)
|
void QmlJSObserverClient::destroyQmlObject(int debugId)
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -313,7 +313,7 @@ void QmlJSDesignDebugClient::destroyQmlObject(int debugId)
|
|||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::reparentQmlObject(int debugId, int newParent)
|
void QmlJSObserverClient::reparentQmlObject(int debugId, int newParent)
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -328,7 +328,7 @@ void QmlJSDesignDebugClient::reparentQmlObject(int debugId, int newParent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::applyChangesToQmlFile()
|
void QmlJSObserverClient::applyChangesToQmlFile()
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -336,7 +336,7 @@ void QmlJSDesignDebugClient::applyChangesToQmlFile()
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSDesignDebugClient::applyChangesFromQmlFile()
|
void QmlJSObserverClient::applyChangesFromQmlFile()
|
||||||
{
|
{
|
||||||
if (!m_connection || !m_connection->isConnected())
|
if (!m_connection || !m_connection->isConnected())
|
||||||
return;
|
return;
|
||||||
@@ -47,11 +47,11 @@
|
|||||||
namespace QmlJSInspector {
|
namespace QmlJSInspector {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QmlJSDesignDebugClient : public QDeclarativeDebugClient
|
class QmlJSObserverClient : public QDeclarativeDebugClient
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit QmlJSDesignDebugClient(QDeclarativeDebugConnection *client,
|
explicit QmlJSObserverClient(QDeclarativeDebugConnection *client,
|
||||||
QObject *parent = 0);
|
QObject *parent = 0);
|
||||||
|
|
||||||
void setSelectedItemsByObjectId(const QList<QDeclarativeDebugObjectReference> &objects);
|
void setSelectedItemsByObjectId(const QList<QDeclarativeDebugObjectReference> &objects);
|
||||||
Reference in New Issue
Block a user