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:
Lasse Holmstedt
2010-08-13 14:18:10 +02:00
parent 5de57ddad3
commit b71c3c62ba
24 changed files with 821 additions and 643 deletions

View File

@@ -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