forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -44,12 +44,14 @@
|
||||
#include <QtNetwork/QAbstractSocket>
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
|
||||
#include <projectexplorer/applicationlauncher.h>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
class ScriptAgent;
|
||||
class WatchData;
|
||||
class QmlAdapter;
|
||||
class QmlResponse;
|
||||
class QmlDebuggerClient;
|
||||
|
||||
@@ -57,7 +59,6 @@ class DEBUGGER_EXPORT QmlEngine : public DebuggerEngine
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
int m_ping;
|
||||
public:
|
||||
explicit QmlEngine(const DebuggerStartParameters &startParameters);
|
||||
~QmlEngine();
|
||||
@@ -112,9 +113,21 @@ private:
|
||||
signals:
|
||||
void sendMessage(const QByteArray &msg);
|
||||
|
||||
private slots:
|
||||
void connectionEstablished();
|
||||
void connectionStartupFailed();
|
||||
void connectionError();
|
||||
|
||||
private:
|
||||
|
||||
void expandObject(const QByteArray &iname, quint64 objectId);
|
||||
void sendPing();
|
||||
|
||||
private:
|
||||
int m_ping;
|
||||
QmlAdapter *m_adapter;
|
||||
ProjectExplorer::ApplicationLauncher m_applicationLauncher;
|
||||
bool m_addedAdapterToObjectPool;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user