summaryrefslogtreecommitdiff
path: root/src/plugins/qmljsinspector/qmljsclientproxy.h
diff options
context:
space:
mode:
authorLasse Holmstedt <lasse.holmstedt@nokia.com>2010-08-13 14:18:10 +0200
committerLasse Holmstedt <lasse.holmstedt@nokia.com>2010-08-13 14:20:39 +0200
commitb71c3c62ba3b4264de05e0e18ab68fd0a8e8ba52 (patch)
tree8503c49137889f97724165d44e94b9d7970d8962 /src/plugins/qmljsinspector/qmljsclientproxy.h
parent5de57ddad398e2da73dc5c2542270e3a64c3690c (diff)
downloadqt-creator-b71c3c62ba3b4264de05e0e18ab68fd0a8e8ba52.tar.gz
QML Debugger refactoring
Now, QmlEngine creates the connection to the inferior (debuggee), and notifies QmlInspector when a connection is established. Before, inspector created the debugger engin, which was wrong. QmlEngine's responsibilities are connecting to the debuggee and basic QML/JS debugging features like locals & watchers, breakpoints etc. QmlInspector takes care of Live Preview and other fancy inspection features. Reviewed-by: hjk
Diffstat (limited to 'src/plugins/qmljsinspector/qmljsclientproxy.h')
-rw-r--r--src/plugins/qmljsinspector/qmljsclientproxy.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.h b/src/plugins/qmljsinspector/qmljsclientproxy.h
index 04f1bb6a5f..d3539ad1f3 100644
--- a/src/plugins/qmljsinspector/qmljsclientproxy.h
+++ b/src/plugins/qmljsinspector/qmljsclientproxy.h
@@ -35,6 +35,12 @@
QT_FORWARD_DECLARE_CLASS(QUrl)
+namespace Debugger {
+namespace Internal {
+class QmlAdapter;
+}
+}
+
namespace QmlJSInspector {
namespace Internal {
@@ -46,7 +52,7 @@ class ClientProxy : public QObject
Q_OBJECT
public:
- static ClientProxy *instance();
+ explicit ClientProxy(Debugger::Internal::QmlAdapter *adapter, QObject *parent = 0);
bool setBindingForObject(int objectDebugId,
const QString &propertyName,
@@ -63,15 +69,13 @@ public:
QDeclarativeDebugObjectReference rootObjectReference() const;
bool isConnected() const;
- bool isUnconnected() const;
void setSelectedItemsByObjectId(const QList<QDeclarativeDebugObjectReference> &objectRefs);
- bool connectToViewer(const QString &host, quint16 port);
- void disconnectFromViewer();
-
QList<QDeclarativeDebugEngineReference> engines() const;
+ Debugger::Internal::QmlAdapter *qmlAdapter() const;
+
signals:
void objectTreeUpdated(const QDeclarativeDebugObjectReference &rootObject);
void connectionStatusMessage(const QString &text);
@@ -81,7 +85,7 @@ signals:
void selectedItemsChanged(const QList<QDeclarativeDebugObjectReference> &selectedItems);
- void connected(QDeclarativeEngineDebug *client);
+ void connected();
void aboutToDisconnect();
void disconnected();
@@ -112,9 +116,10 @@ public slots:
void setContextPathIndex(int contextIndex);
private slots:
+ void disconnectFromServer();
+ void connectToServer();
+
void contextChanged();
- void connectionStateChanged();
- void connectionError();
void onCurrentObjectsChanged(const QList<int> &debugIds);
void updateEngineList();
@@ -123,17 +128,14 @@ private slots:
private:
bool isDesignClientConnected() const;
void reloadEngines();
- void createDebuggerClient();
+
QList<QDeclarativeDebugObjectReference> objectReferences(const QUrl &url, const QDeclarativeDebugObjectReference &objectRef) const;
QDeclarativeDebugObjectReference objectReferenceForId(int debugId, const QDeclarativeDebugObjectReference &ref) const;
private:
- explicit ClientProxy(QObject *parent = 0);
Q_DISABLE_COPY(ClientProxy);
- static ClientProxy *m_instance;
-
- QDeclarativeDebugConnection *m_conn;
+ Debugger::Internal::QmlAdapter *m_adapter;
QDeclarativeEngineDebug *m_client;
QmlJSDesignDebugClient *m_designClient;
@@ -143,8 +145,6 @@ private:
QDeclarativeDebugObjectReference m_rootObject;
QList<QDeclarativeDebugEngineReference> m_engines;
-
- friend class QmlJSInspector::Internal::InspectorPlugin;
};
} // namespace Internal