QDeclarativeEngineDebug: Rename class

Renamed to QmlEngineDebugClient

Change-Id: I200e8ccf23a3464e2b6ad07288d17228118e905f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2012-03-14 09:30:28 +01:00
committed by Kai Koehne
parent dffbc4407a
commit 06ae4b3512
12 changed files with 144 additions and 201 deletions

View File

@@ -29,49 +29,31 @@
** **
**************************************************************************/ **************************************************************************/
#include "qdeclarativeenginedebug.h" #include "qmlenginedebugclient.h"
#include "qdeclarativedebugclient.h"
namespace QmlJsDebugClient { namespace QmlJsDebugClient {
class QDeclarativeEngineDebugClient : public QDeclarativeDebugClient class QmlEngineDebugClientPrivate
{ {
public: public:
QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, QDeclarativeEngineDebugPrivate *p); QmlEngineDebugClientPrivate(QmlEngineDebugClient *);
~QmlEngineDebugClientPrivate();
protected:
virtual void statusChanged(Status status);
virtual void messageReceived(const QByteArray &);
private:
QDeclarativeEngineDebugPrivate *priv;
friend class QDeclarativeEngineDebugPrivate;
};
class QDeclarativeEngineDebugPrivate
{
// Q_DECLARE_PUBLIC(QDeclarativeEngineDebug)
public:
QDeclarativeEngineDebugPrivate(QDeclarativeEngineDebug *, QDeclarativeDebugConnection *);
~QDeclarativeEngineDebugPrivate();
void statusChanged(QDeclarativeDebugClient::Status status); void statusChanged(QDeclarativeDebugClient::Status status);
void message(const QByteArray &); void message(const QByteArray &);
QDeclarativeEngineDebugClient *client; QmlEngineDebugClient *q;
QDeclarativeEngineDebug *q_ptr;
int nextId; int nextId;
int getId(); int getId();
void decode(QDataStream &, QDeclarativeDebugContextReference &); void decode(QDataStream &, QDeclarativeDebugContextReference &);
void decode(QDataStream &, QDeclarativeDebugObjectReference &, bool simple); void decode(QDataStream &, QDeclarativeDebugObjectReference &, bool simple);
static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugEnginesQuery *); static void remove(QmlEngineDebugClient *, QDeclarativeDebugEnginesQuery *);
static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugRootContextQuery *); static void remove(QmlEngineDebugClient *, QDeclarativeDebugRootContextQuery *);
static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugObjectQuery *); static void remove(QmlEngineDebugClient *, QDeclarativeDebugObjectQuery *);
static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugExpressionQuery *); static void remove(QmlEngineDebugClient *, QDeclarativeDebugExpressionQuery *);
static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugWatch *); static void remove(QmlEngineDebugClient *, QDeclarativeDebugWatch *);
QHash<int, QDeclarativeDebugEnginesQuery *> enginesQuery; QHash<int, QDeclarativeDebugEnginesQuery *> enginesQuery;
QHash<int, QDeclarativeDebugRootContextQuery *> rootContextQuery; QHash<int, QDeclarativeDebugRootContextQuery *> rootContextQuery;
@@ -81,35 +63,23 @@ public:
QHash<int, QDeclarativeDebugWatch *> watched; QHash<int, QDeclarativeDebugWatch *> watched;
}; };
QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, void QmlEngineDebugClient::statusChanged(Status status)
QDeclarativeEngineDebugPrivate *p) {
: QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p) emit newStatus(status);
}
void QmlEngineDebugClient::messageReceived(const QByteArray &data)
{
d->message(data);
}
QmlEngineDebugClientPrivate::QmlEngineDebugClientPrivate(QmlEngineDebugClient *q)
: q(q), nextId(0)
{ {
} }
void QDeclarativeEngineDebugClient::statusChanged(Status status) QmlEngineDebugClientPrivate::~QmlEngineDebugClientPrivate()
{ {
if (priv)
priv->statusChanged(status);
}
void QDeclarativeEngineDebugClient::messageReceived(const QByteArray &data)
{
if (priv)
priv->message(data);
}
QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeEngineDebug *q, QDeclarativeDebugConnection *c)
: client(new QDeclarativeEngineDebugClient(c, this)), q_ptr(q), nextId(0)
{
}
QDeclarativeEngineDebugPrivate::~QDeclarativeEngineDebugPrivate()
{
if (client)
client->priv = 0;
delete client;
QHash<int, QDeclarativeDebugEnginesQuery*>::iterator enginesIter = enginesQuery.begin(); QHash<int, QDeclarativeDebugEnginesQuery*>::iterator enginesIter = enginesQuery.begin();
for (; enginesIter != enginesQuery.end(); ++enginesIter) { for (; enginesIter != enginesQuery.end(); ++enginesIter) {
enginesIter.value()->m_client = 0; enginesIter.value()->m_client = 0;
@@ -145,32 +115,32 @@ QDeclarativeEngineDebugPrivate::~QDeclarativeEngineDebugPrivate()
} }
} }
int QDeclarativeEngineDebugPrivate::getId() int QmlEngineDebugClientPrivate::getId()
{ {
return nextId++; return nextId++;
} }
void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugEnginesQuery *q) void QmlEngineDebugClientPrivate::remove(QmlEngineDebugClient *c, QDeclarativeDebugEnginesQuery *q)
{ {
if (c && q) { if (c && q) {
QDeclarativeEngineDebugPrivate *p = c->d_func(); QmlEngineDebugClientPrivate *p = c->priv();
p->enginesQuery.remove(q->m_queryId); p->enginesQuery.remove(q->m_queryId);
} }
} }
void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, void QmlEngineDebugClientPrivate::remove(QmlEngineDebugClient *c,
QDeclarativeDebugRootContextQuery *q) QDeclarativeDebugRootContextQuery *q)
{ {
if (c && q) { if (c && q) {
QDeclarativeEngineDebugPrivate *p = c->d_func(); QmlEngineDebugClientPrivate *p = c->priv();
p->rootContextQuery.remove(q->m_queryId); p->rootContextQuery.remove(q->m_queryId);
} }
} }
void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugWatch *w) void QmlEngineDebugClientPrivate::remove(QmlEngineDebugClient *c, QDeclarativeDebugWatch *w)
{ {
if (c && w) { if (c && w) {
QDeclarativeEngineDebugPrivate *p = c->d_func(); QmlEngineDebugClientPrivate *p = c->priv();
p->watched.remove(w->m_queryId); p->watched.remove(w->m_queryId);
} }
} }
@@ -213,23 +183,23 @@ QDataStream &operator>>(QDataStream &ds, QDeclarativeObjectProperty &data)
return ds; return ds;
} }
void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugObjectQuery *q) void QmlEngineDebugClientPrivate::remove(QmlEngineDebugClient *c, QDeclarativeDebugObjectQuery *q)
{ {
if (c && q) { if (c && q) {
QDeclarativeEngineDebugPrivate *p = c->d_func(); QmlEngineDebugClientPrivate *p = c->priv();
p->objectQuery.remove(q->m_queryId); p->objectQuery.remove(q->m_queryId);
} }
} }
void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugExpressionQuery *q) void QmlEngineDebugClientPrivate::remove(QmlEngineDebugClient *c, QDeclarativeDebugExpressionQuery *q)
{ {
if (c && q) { if (c && q) {
QDeclarativeEngineDebugPrivate *p = c->d_func(); QmlEngineDebugClientPrivate *p = c->priv();
p->expressionQuery.remove(q->m_queryId); p->expressionQuery.remove(q->m_queryId);
} }
} }
void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o, void QmlEngineDebugClientPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o,
bool simple) bool simple)
{ {
QDeclarativeObjectData data; QDeclarativeObjectData data;
@@ -289,7 +259,7 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugOb
} }
} }
void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugContextReference &c) void QmlEngineDebugClientPrivate::decode(QDataStream &ds, QDeclarativeDebugContextReference &c)
{ {
ds >> c.m_name >> c.m_debugId; ds >> c.m_name >> c.m_debugId;
@@ -313,12 +283,12 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugCo
} }
} }
void QDeclarativeEngineDebugPrivate::statusChanged(QDeclarativeDebugClient::Status status) void QmlEngineDebugClientPrivate::statusChanged(QDeclarativeDebugClient::Status status)
{ {
emit q_ptr->statusChanged(status); emit q->statusChanged(status);
} }
void QDeclarativeEngineDebugPrivate::message(const QByteArray &data) void QmlEngineDebugClientPrivate::message(const QByteArray &data)
{ {
QDataStream ds(data); QDataStream ds(data);
@@ -431,33 +401,25 @@ void QDeclarativeEngineDebugPrivate::message(const QByteArray &data)
return; return;
emit watch->valueChanged(name, value); emit watch->valueChanged(name, value);
} else if (type == "OBJECT_CREATED") { } else if (type == "OBJECT_CREATED") {
emit q_ptr->newObjects(); emit q->newObjects();
} }
} }
QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *client, QObject *parent) QmlEngineDebugClient::QmlEngineDebugClient(QDeclarativeDebugConnection *client)
: QObject(parent), d_ptr(new QDeclarativeEngineDebugPrivate(this, client)) : QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client),
{ d(new QmlEngineDebugClientPrivate(this))
setObjectName(d_ptr->client->name());
}
QDeclarativeEngineDebug::~QDeclarativeEngineDebug()
{ {
} }
QDeclarativeDebugClient::Status QDeclarativeEngineDebug::status() const QmlEngineDebugClient::~QmlEngineDebugClient()
{ {
Q_D(const QDeclarativeEngineDebug); delete d;
return d->client->status();
} }
QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent) QDeclarativeDebugPropertyWatch *QmlEngineDebugClient::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent)
{ {
Q_D(QDeclarativeEngineDebug);
QDeclarativeDebugPropertyWatch *watch = new QDeclarativeDebugPropertyWatch(parent); QDeclarativeDebugPropertyWatch *watch = new QDeclarativeDebugPropertyWatch(parent);
if (d->client->status() == QDeclarativeDebugClient::Enabled) { if (status() == QDeclarativeDebugClient::Enabled) {
int queryId = d->getId(); int queryId = d->getId();
watch->m_queryId = queryId; watch->m_queryId = queryId;
watch->m_client = this; watch->m_client = this;
@@ -468,7 +430,7 @@ QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclara
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8(); ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8();
d->client->sendMessage(message); sendMessage(message);
} else { } else {
watch->m_state = QDeclarativeDebugWatch::Dead; watch->m_state = QDeclarativeDebugWatch::Dead;
} }
@@ -476,17 +438,16 @@ QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclara
return watch; return watch;
} }
QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugContextReference &, const QString &, QObject *) QDeclarativeDebugWatch *QmlEngineDebugClient::addWatch(const QDeclarativeDebugContextReference &, const QString &, QObject *)
{ {
qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented"); qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented");
return 0; return 0;
} }
QDeclarativeDebugObjectExpressionWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, const QString &expr, QObject *parent) QDeclarativeDebugObjectExpressionWatch *QmlEngineDebugClient::addWatch(const QDeclarativeDebugObjectReference &object, const QString &expr, QObject *parent)
{ {
Q_D(QDeclarativeEngineDebug);
QDeclarativeDebugObjectExpressionWatch *watch = new QDeclarativeDebugObjectExpressionWatch(parent); QDeclarativeDebugObjectExpressionWatch *watch = new QDeclarativeDebugObjectExpressionWatch(parent);
if (d->client->status() == QDeclarativeDebugClient::Enabled) { if (status() == QDeclarativeDebugClient::Enabled) {
int queryId = d->getId(); int queryId = d->getId();
watch->m_queryId = queryId; watch->m_queryId = queryId;
watch->m_client = this; watch->m_client = this;
@@ -497,19 +458,17 @@ QDeclarativeDebugObjectExpressionWatch *QDeclarativeEngineDebug::addWatch(const
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr; ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr;
d->client->sendMessage(message); sendMessage(message);
} else { } else {
watch->m_state = QDeclarativeDebugWatch::Dead; watch->m_state = QDeclarativeDebugWatch::Dead;
} }
return watch; return watch;
} }
QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, QObject *parent) QDeclarativeDebugWatch *QmlEngineDebugClient::addWatch(const QDeclarativeDebugObjectReference &object, QObject *parent)
{ {
Q_D(QDeclarativeEngineDebug);
QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent); QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent);
if (d->client->status() == QDeclarativeDebugClient::Enabled) { if (status() == QDeclarativeDebugClient::Enabled) {
int queryId = d->getId(); int queryId = d->getId();
watch->m_queryId = queryId; watch->m_queryId = queryId;
watch->m_client = this; watch->m_client = this;
@@ -519,7 +478,7 @@ QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebu
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId(); ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId();
d->client->sendMessage(message); sendMessage(message);
} else { } else {
watch->m_state = QDeclarativeDebugWatch::Dead; watch->m_state = QDeclarativeDebugWatch::Dead;
} }
@@ -527,16 +486,14 @@ QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebu
return watch; return watch;
} }
QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugFileReference &, QObject *) QDeclarativeDebugWatch *QmlEngineDebugClient::addWatch(const QDeclarativeDebugFileReference &, QObject *)
{ {
qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented"); qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented");
return 0; return 0;
} }
void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch) void QmlEngineDebugClient::removeWatch(QDeclarativeDebugWatch *watch)
{ {
Q_D(QDeclarativeEngineDebug);
if (!watch || !watch->m_client) if (!watch || !watch->m_client)
return; return;
@@ -545,20 +502,18 @@ void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch)
d->watched.remove(watch->queryId()); d->watched.remove(watch->queryId());
if (d->client && d->client->status() == QDeclarativeDebugClient::Enabled) { if (status() == QDeclarativeDebugClient::Enabled) {
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("NO_WATCH") << watch->queryId(); ds << QByteArray("NO_WATCH") << watch->queryId();
d->client->sendMessage(message); sendMessage(message);
} }
} }
QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QObject *parent) QDeclarativeDebugEnginesQuery *QmlEngineDebugClient::queryAvailableEngines(QObject *parent)
{ {
Q_D(QDeclarativeEngineDebug);
QDeclarativeDebugEnginesQuery *query = new QDeclarativeDebugEnginesQuery(parent); QDeclarativeDebugEnginesQuery *query = new QDeclarativeDebugEnginesQuery(parent);
if (d->client->status() == QDeclarativeDebugClient::Enabled) { if (status() == QDeclarativeDebugClient::Enabled) {
query->m_client = this; query->m_client = this;
int queryId = d->getId(); int queryId = d->getId();
query->m_queryId = queryId; query->m_queryId = queryId;
@@ -567,7 +522,7 @@ QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QO
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("LIST_ENGINES") << queryId; ds << QByteArray("LIST_ENGINES") << queryId;
d->client->sendMessage(message); sendMessage(message);
} else { } else {
query->m_state = QDeclarativeDebugQuery::Error; query->m_state = QDeclarativeDebugQuery::Error;
} }
@@ -575,12 +530,10 @@ QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QO
return query; return query;
} }
QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(const QDeclarativeDebugEngineReference &engine, QObject *parent) QDeclarativeDebugRootContextQuery *QmlEngineDebugClient::queryRootContexts(const QDeclarativeDebugEngineReference &engine, QObject *parent)
{ {
Q_D(QDeclarativeEngineDebug);
QDeclarativeDebugRootContextQuery *query = new QDeclarativeDebugRootContextQuery(parent); QDeclarativeDebugRootContextQuery *query = new QDeclarativeDebugRootContextQuery(parent);
if (d->client->status() == QDeclarativeDebugClient::Enabled && engine.debugId() != -1) { if (status() == QDeclarativeDebugClient::Enabled && engine.debugId() != -1) {
query->m_client = this; query->m_client = this;
int queryId = d->getId(); int queryId = d->getId();
query->m_queryId = queryId; query->m_queryId = queryId;
@@ -589,7 +542,7 @@ QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(co
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId(); ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId();
d->client->sendMessage(message); sendMessage(message);
} else { } else {
query->m_state = QDeclarativeDebugQuery::Error; query->m_state = QDeclarativeDebugQuery::Error;
} }
@@ -597,12 +550,10 @@ QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(co
return query; return query;
} }
QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclarativeDebugObjectReference &object, QObject *parent) QDeclarativeDebugObjectQuery *QmlEngineDebugClient::queryObject(const QDeclarativeDebugObjectReference &object, QObject *parent)
{ {
Q_D(QDeclarativeEngineDebug);
QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent);
if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { if (status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) {
query->m_client = this; query->m_client = this;
int queryId = d->getId(); int queryId = d->getId();
query->m_queryId = queryId; query->m_queryId = queryId;
@@ -612,7 +563,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclar
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
<< false << true; << false << true;
d->client->sendMessage(message); sendMessage(message);
} else { } else {
query->m_state = QDeclarativeDebugQuery::Error; query->m_state = QDeclarativeDebugQuery::Error;
} }
@@ -620,12 +571,10 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclar
return query; return query;
} }
QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(const QDeclarativeDebugObjectReference &object, QObject *parent) QDeclarativeDebugObjectQuery *QmlEngineDebugClient::queryObjectRecursive(const QDeclarativeDebugObjectReference &object, QObject *parent)
{ {
Q_D(QDeclarativeEngineDebug);
QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent);
if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { if (status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) {
query->m_client = this; query->m_client = this;
int queryId = d->getId(); int queryId = d->getId();
query->m_queryId = queryId; query->m_queryId = queryId;
@@ -635,7 +584,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(cons
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId()
<< true << true; << true << true;
d->client->sendMessage(message); sendMessage(message);
} else { } else {
query->m_state = QDeclarativeDebugQuery::Error; query->m_state = QDeclarativeDebugQuery::Error;
} }
@@ -643,12 +592,10 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(cons
return query; return query;
} }
QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent) QDeclarativeDebugExpressionQuery *QmlEngineDebugClient::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent)
{ {
Q_D(QDeclarativeEngineDebug);
QDeclarativeDebugExpressionQuery *query = new QDeclarativeDebugExpressionQuery(parent); QDeclarativeDebugExpressionQuery *query = new QDeclarativeDebugExpressionQuery(parent);
if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { if (status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
query->m_client = this; query->m_client = this;
query->m_expr = expr; query->m_expr = expr;
int queryId = d->getId(); int queryId = d->getId();
@@ -658,7 +605,7 @@ QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr; ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr;
d->client->sendMessage(message); sendMessage(message);
} else { } else {
query->m_state = QDeclarativeDebugQuery::Error; query->m_state = QDeclarativeDebugQuery::Error;
} }
@@ -666,49 +613,43 @@ QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult
return query; return query;
} }
bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName, bool QmlEngineDebugClient::setBindingForObject(int objectDebugId, const QString &propertyName,
const QVariant &bindingExpression, const QVariant &bindingExpression,
bool isLiteralValue, bool isLiteralValue,
QString source, int line) QString source, int line)
{ {
Q_D(QDeclarativeEngineDebug); if (status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line; ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line;
d->client->sendMessage(message); sendMessage(message);
return true; return true;
} else { } else {
return false; return false;
} }
} }
bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName) bool QmlEngineDebugClient::resetBindingForObject(int objectDebugId, const QString &propertyName)
{ {
Q_D(QDeclarativeEngineDebug); if (status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName; ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName;
d->client->sendMessage(message); sendMessage(message);
return true; return true;
} else { } else {
return false; return false;
} }
} }
bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &methodName, bool QmlEngineDebugClient::setMethodBody(int objectDebugId, const QString &methodName,
const QString &methodBody) const QString &methodBody)
{ {
Q_D(QDeclarativeEngineDebug); if (status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
QByteArray message; QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly); QDataStream ds(&message, QIODevice::WriteOnly);
ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody; ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody;
d->client->sendMessage(message); sendMessage(message);
return true; return true;
} else { } else {
return false; return false;
@@ -723,7 +664,7 @@ QDeclarativeDebugWatch::QDeclarativeDebugWatch(QObject *parent)
QDeclarativeDebugWatch::~QDeclarativeDebugWatch() QDeclarativeDebugWatch::~QDeclarativeDebugWatch()
{ {
if (m_client && m_queryId != -1) if (m_client && m_queryId != -1)
QDeclarativeEngineDebugPrivate::remove(m_client, this); QmlEngineDebugClientPrivate::remove(m_client, this);
} }
int QDeclarativeDebugWatch::queryId() const int QDeclarativeDebugWatch::queryId() const
@@ -802,7 +743,7 @@ QDeclarativeDebugEnginesQuery::QDeclarativeDebugEnginesQuery(QObject *parent)
QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery() QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery()
{ {
if (m_client && m_queryId != -1) if (m_client && m_queryId != -1)
QDeclarativeEngineDebugPrivate::remove(m_client, this); QmlEngineDebugClientPrivate::remove(m_client, this);
} }
QList<QDeclarativeDebugEngineReference> QDeclarativeDebugEnginesQuery::engines() const QList<QDeclarativeDebugEngineReference> QDeclarativeDebugEnginesQuery::engines() const
@@ -818,7 +759,7 @@ QDeclarativeDebugRootContextQuery::QDeclarativeDebugRootContextQuery(QObject *pa
QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery() QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery()
{ {
if (m_client && m_queryId != -1) if (m_client && m_queryId != -1)
QDeclarativeEngineDebugPrivate::remove(m_client, this); QmlEngineDebugClientPrivate::remove(m_client, this);
} }
QDeclarativeDebugContextReference QDeclarativeDebugRootContextQuery::rootContext() const QDeclarativeDebugContextReference QDeclarativeDebugRootContextQuery::rootContext() const
@@ -834,7 +775,7 @@ QDeclarativeDebugObjectQuery::QDeclarativeDebugObjectQuery(QObject *parent)
QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery() QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery()
{ {
if (m_client && m_queryId != -1) if (m_client && m_queryId != -1)
QDeclarativeEngineDebugPrivate::remove(m_client, this); QmlEngineDebugClientPrivate::remove(m_client, this);
} }
QDeclarativeDebugObjectReference QDeclarativeDebugObjectQuery::object() const QDeclarativeDebugObjectReference QDeclarativeDebugObjectQuery::object() const
@@ -850,7 +791,7 @@ QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(QObject *pare
QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery() QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery()
{ {
if (m_client && m_queryId != -1) if (m_client && m_queryId != -1)
QDeclarativeEngineDebugPrivate::remove(m_client, this); QmlEngineDebugClientPrivate::remove(m_client, this);
} }
QVariant QDeclarativeDebugExpressionQuery::expression() const QVariant QDeclarativeDebugExpressionQuery::expression() const

View File

@@ -29,12 +29,11 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef QDECLARATIVEENGINEDEBUG_H #ifndef QMLENGINEDEBUGCLIENT_H
#define QDECLARATIVEENGINEDEBUG_H #define QMLENGINEDEBUGCLIENT_H
#include "qmljsdebugclient_global.h" #include "qmljsdebugclient_global.h"
#include "qdeclarativedebugclient.h" #include "qdeclarativedebugclient.h"
#include <qobject.h>
#include <qurl.h> #include <qurl.h>
#include <qvariant.h> #include <qvariant.h>
@@ -53,16 +52,14 @@ class QDeclarativeDebugContextReference;
class QDeclarativeDebugObjectReference; class QDeclarativeDebugObjectReference;
class QDeclarativeDebugFileReference; class QDeclarativeDebugFileReference;
class QDeclarativeDebugEngineReference; class QDeclarativeDebugEngineReference;
class QDeclarativeEngineDebugPrivate; class QmlEngineDebugClientPrivate;
class QMLJSDEBUGCLIENT_EXPORT QDeclarativeEngineDebug : public QObject class QMLJSDEBUGCLIENT_EXPORT QmlEngineDebugClient : public QDeclarativeDebugClient
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0); explicit QmlEngineDebugClient(QDeclarativeDebugConnection *);
~QDeclarativeEngineDebug(); ~QmlEngineDebugClient();
QDeclarativeDebugClient::Status status() const;
QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &, QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &,
QObject *parent = 0); QObject *parent = 0);
@@ -93,13 +90,18 @@ public:
bool resetBindingForObject(int objectDebugId, const QString &propertyName); bool resetBindingForObject(int objectDebugId, const QString &propertyName);
bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody); bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody);
QmlEngineDebugClientPrivate *priv() const { return d; }
Q_SIGNALS: Q_SIGNALS:
void newObjects(); void newObjects();
void statusChanged(QDeclarativeDebugClient::Status status); void newStatus(QDeclarativeDebugClient::Status status);
protected:
virtual void statusChanged(Status status);
virtual void messageReceived(const QByteArray &);
private: private:
Q_DECLARE_PRIVATE(QDeclarativeEngineDebug) friend class QmlEngineDebugClientPrivate;
QScopedPointer<QDeclarativeEngineDebugPrivate> d_ptr; QmlEngineDebugClientPrivate *d;
}; };
class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugWatch : public QObject class QMLJSDEBUGCLIENT_EXPORT QDeclarativeDebugWatch : public QObject
@@ -124,12 +126,12 @@ Q_SIGNALS:
void valueChanged(const QByteArray &name, const QVariant &value); void valueChanged(const QByteArray &name, const QVariant &value);
private: private:
friend class QDeclarativeEngineDebug; friend class QmlEngineDebugClient;
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
void setState(State); void setState(State);
State m_state; State m_state;
int m_queryId; int m_queryId;
QDeclarativeEngineDebug *m_client; QmlEngineDebugClient *m_client;
int m_objectDebugId; int m_objectDebugId;
}; };
@@ -142,7 +144,7 @@ public:
QString name() const; QString name() const;
private: private:
friend class QDeclarativeEngineDebug; friend class QmlEngineDebugClient;
QString m_name; QString m_name;
}; };
@@ -155,7 +157,7 @@ public:
QString expression() const; QString expression() const;
private: private:
friend class QDeclarativeEngineDebug; friend class QmlEngineDebugClient;
QString m_expr; QString m_expr;
int m_debugId; int m_debugId;
}; };
@@ -176,8 +178,8 @@ protected:
QDeclarativeDebugQuery(QObject *); QDeclarativeDebugQuery(QObject *);
private: private:
friend class QDeclarativeEngineDebug; friend class QmlEngineDebugClient;
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
void setState(State); void setState(State);
State m_state; State m_state;
}; };
@@ -197,7 +199,7 @@ public:
void setColumnNumber(int); void setColumnNumber(int);
private: private:
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
QUrl m_url; QUrl m_url;
int m_lineNumber; int m_lineNumber;
int m_columnNumber; int m_columnNumber;
@@ -215,7 +217,7 @@ public:
QString name() const; QString name() const;
private: private:
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
int m_debugId; int m_debugId;
QString m_name; QString m_name;
}; };
@@ -240,7 +242,7 @@ public:
QList<QDeclarativeDebugObjectReference> children() const; QList<QDeclarativeDebugObjectReference> children() const;
private: private:
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
int m_debugId; int m_debugId;
QString m_class; QString m_class;
QString m_idString; QString m_idString;
@@ -265,7 +267,7 @@ public:
QList<QDeclarativeDebugContextReference> contexts() const; QList<QDeclarativeDebugContextReference> contexts() const;
private: private:
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
int m_debugId; int m_debugId;
QString m_name; QString m_name;
QList<QDeclarativeDebugObjectReference> m_objects; QList<QDeclarativeDebugObjectReference> m_objects;
@@ -287,7 +289,7 @@ public:
bool hasNotifySignal() const; bool hasNotifySignal() const;
private: private:
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
int m_objectDebugId; int m_objectDebugId;
QString m_name; QString m_name;
QVariant m_value; QVariant m_value;
@@ -304,10 +306,10 @@ public:
virtual ~QDeclarativeDebugEnginesQuery(); virtual ~QDeclarativeDebugEnginesQuery();
QList<QDeclarativeDebugEngineReference> engines() const; QList<QDeclarativeDebugEngineReference> engines() const;
private: private:
friend class QDeclarativeEngineDebug; friend class QmlEngineDebugClient;
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
QDeclarativeDebugEnginesQuery(QObject *); QDeclarativeDebugEnginesQuery(QObject *);
QDeclarativeEngineDebug *m_client; QmlEngineDebugClient *m_client;
int m_queryId; int m_queryId;
QList<QDeclarativeDebugEngineReference> m_engines; QList<QDeclarativeDebugEngineReference> m_engines;
}; };
@@ -319,10 +321,10 @@ public:
virtual ~QDeclarativeDebugRootContextQuery(); virtual ~QDeclarativeDebugRootContextQuery();
QDeclarativeDebugContextReference rootContext() const; QDeclarativeDebugContextReference rootContext() const;
private: private:
friend class QDeclarativeEngineDebug; friend class QmlEngineDebugClient;
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
QDeclarativeDebugRootContextQuery(QObject *); QDeclarativeDebugRootContextQuery(QObject *);
QDeclarativeEngineDebug *m_client; QmlEngineDebugClient *m_client;
int m_queryId; int m_queryId;
QDeclarativeDebugContextReference m_context; QDeclarativeDebugContextReference m_context;
}; };
@@ -334,10 +336,10 @@ public:
virtual ~QDeclarativeDebugObjectQuery(); virtual ~QDeclarativeDebugObjectQuery();
QDeclarativeDebugObjectReference object() const; QDeclarativeDebugObjectReference object() const;
private: private:
friend class QDeclarativeEngineDebug; friend class QmlEngineDebugClient;
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
QDeclarativeDebugObjectQuery(QObject *); QDeclarativeDebugObjectQuery(QObject *);
QDeclarativeEngineDebug *m_client; QmlEngineDebugClient *m_client;
int m_queryId; int m_queryId;
QDeclarativeDebugObjectReference m_object; QDeclarativeDebugObjectReference m_object;
@@ -351,10 +353,10 @@ public:
QVariant expression() const; QVariant expression() const;
QVariant result() const; QVariant result() const;
private: private:
friend class QDeclarativeEngineDebug; friend class QmlEngineDebugClient;
friend class QDeclarativeEngineDebugPrivate; friend class QmlEngineDebugClientPrivate;
QDeclarativeDebugExpressionQuery(QObject *); QDeclarativeDebugExpressionQuery(QObject *);
QDeclarativeEngineDebug *m_client; QmlEngineDebugClient *m_client;
int m_queryId; int m_queryId;
QVariant m_expr; QVariant m_expr;
QVariant m_result; QVariant m_result;
@@ -367,4 +369,4 @@ Q_DECLARE_METATYPE(QmlJsDebugClient::QDeclarativeDebugObjectReference)
Q_DECLARE_METATYPE(QmlJsDebugClient::QDeclarativeDebugContextReference) Q_DECLARE_METATYPE(QmlJsDebugClient::QDeclarativeDebugContextReference)
Q_DECLARE_METATYPE(QmlJsDebugClient::QDeclarativeDebugPropertyReference) Q_DECLARE_METATYPE(QmlJsDebugClient::QDeclarativeDebugPropertyReference)
#endif // QDECLARATIVEENGINEDEBUG_H #endif // QMLENGINEDEBUGCLIENT_H

View File

@@ -9,7 +9,7 @@ INCLUDEPATH += $$PWD/..
HEADERS += \ HEADERS += \
$$PWD/qmlprofilereventlocation.h \ $$PWD/qmlprofilereventlocation.h \
$$PWD/qdeclarativedebugclient.h \ $$PWD/qdeclarativedebugclient.h \
$$PWD/qdeclarativeenginedebug.h \ $$PWD/qmlenginedebugclient.h \
$$PWD/qdeclarativeoutputparser.h \ $$PWD/qdeclarativeoutputparser.h \
$$PWD/qmljsdebugclient_global.h \ $$PWD/qmljsdebugclient_global.h \
$$PWD/qmlprofilereventtypes.h \ $$PWD/qmlprofilereventtypes.h \
@@ -21,7 +21,7 @@ HEADERS += \
SOURCES += \ SOURCES += \
$$PWD/qdeclarativedebugclient.cpp \ $$PWD/qdeclarativedebugclient.cpp \
$$PWD/qdeclarativeenginedebug.cpp \ $$PWD/qmlenginedebugclient.cpp \
$$PWD/qdeclarativeoutputparser.cpp \ $$PWD/qdeclarativeoutputparser.cpp \
$$PWD/qmlprofilertraceclient.cpp \ $$PWD/qmlprofilertraceclient.cpp \
$$PWD/qpacketprotocol.cpp \ $$PWD/qpacketprotocol.cpp \

View File

@@ -30,8 +30,8 @@ DynamicLibrary {
"qv8profilerclient.cpp", "qv8profilerclient.cpp",
"qv8profilerclient.h", "qv8profilerclient.h",
"qdeclarativedebugclient.h", "qdeclarativedebugclient.h",
"qdeclarativeenginedebug.cpp", "qmlenginedebugclient.cpp",
"qdeclarativeenginedebug.h", "qmlenginedebugclient.h",
"qmlprofilereventtypes.h", "qmlprofilereventtypes.h",
"qmlprofilertraceclient.h", "qmlprofilertraceclient.h",
"qpacketprotocol.h", "qpacketprotocol.h",

View File

@@ -67,7 +67,7 @@ public:
QWeakPointer<DebuggerEngine> m_engine; QWeakPointer<DebuggerEngine> m_engine;
QmlDebuggerClient *m_qmlClient; QmlDebuggerClient *m_qmlClient;
QmlJsDebugClient::QDeclarativeEngineDebug *m_engineDebugClient; QmlJsDebugClient::QmlEngineDebugClient *m_engineDebugClient;
QTimer m_connectionTimer; QTimer m_connectionTimer;
QDeclarativeDebugConnection *m_conn; QDeclarativeDebugConnection *m_conn;
QHash<QString, QmlDebuggerClient*> debugClients; QHash<QString, QmlDebuggerClient*> debugClients;
@@ -304,12 +304,12 @@ QHash<QString, Internal::QmlDebuggerClient*> QmlAdapter::debuggerClients()
return d->debugClients; return d->debugClients;
} }
QmlJsDebugClient::QDeclarativeEngineDebug *QmlAdapter::engineDebugClient() const QmlJsDebugClient::QmlEngineDebugClient *QmlAdapter::engineDebugClient() const
{ {
return d->m_engineDebugClient; return d->m_engineDebugClient;
} }
void QmlAdapter::setEngineDebugClient(QmlJsDebugClient::QDeclarativeEngineDebug *client) void QmlAdapter::setEngineDebugClient(QmlJsDebugClient::QmlEngineDebugClient *client)
{ {
d->m_engineDebugClient = client; d->m_engineDebugClient = client;
} }

View File

@@ -40,7 +40,7 @@
#include <QAbstractSocket> #include <QAbstractSocket>
namespace QmlJsDebugClient { namespace QmlJsDebugClient {
class QDeclarativeEngineDebug; class QmlEngineDebugClient;
class QDeclarativeDebugConnection; class QDeclarativeDebugConnection;
class QDebugMessageClient; class QDebugMessageClient;
} }
@@ -76,8 +76,8 @@ public:
Internal::QmlDebuggerClient *activeDebuggerClient(); Internal::QmlDebuggerClient *activeDebuggerClient();
QHash<QString, Internal::QmlDebuggerClient*> debuggerClients(); QHash<QString, Internal::QmlDebuggerClient*> debuggerClients();
QmlJsDebugClient::QDeclarativeEngineDebug *engineDebugClient() const; QmlJsDebugClient::QmlEngineDebugClient *engineDebugClient() const;
void setEngineDebugClient(QmlJsDebugClient::QDeclarativeEngineDebug *client); void setEngineDebugClient(QmlJsDebugClient::QmlEngineDebugClient *client);
QDebugMessageClient *messageClient() const; QDebugMessageClient *messageClient() const;

View File

@@ -1149,7 +1149,7 @@ bool QmlEngine::evaluateScriptExpression(const QString& expression)
//is sent to V8DebugService. In all other cases, the //is sent to V8DebugService. In all other cases, the
//expression is evaluated by QDeclarativeEngine. //expression is evaluated by QDeclarativeEngine.
if (state() != InferiorStopOk) { if (state() != InferiorStopOk) {
QDeclarativeEngineDebug *engineDebug = QmlEngineDebugClient *engineDebug =
d->m_adapter.engineDebugClient(); d->m_adapter.engineDebugClient();
int id = d->m_adapter.currentSelectedDebugId(); int id = d->m_adapter.currentSelectedDebugId();

View File

@@ -34,7 +34,7 @@
#define DEBUGGER_QMLENGINE_H #define DEBUGGER_QMLENGINE_H
#include "debuggerengine.h" #include "debuggerengine.h"
#include <qmljsdebugclient/qdeclarativeenginedebug.h> #include <qmljsdebugclient/qmlenginedebugclient.h>
#include <qmljsdebugclient/qdebugmessageclient.h> #include <qmljsdebugclient/qdebugmessageclient.h>
#include <utils/outputformat.h> #include <utils/outputformat.h>
#include <qmljs/qmljsdocument.h> #include <qmljs/qmljsdocument.h>

View File

@@ -32,7 +32,7 @@
#ifndef QMLJSPRIVATEAPI_H #ifndef QMLJSPRIVATEAPI_H
#define QMLJSPRIVATEAPI_H #define QMLJSPRIVATEAPI_H
#include <qmljsdebugclient/qdeclarativeenginedebug.h> #include <qmljsdebugclient/qmlenginedebugclient.h>
#include <qmljsdebugclient/qdeclarativedebugclient.h> #include <qmljsdebugclient/qdeclarativedebugclient.h>
using namespace QmlJsDebugClient; using namespace QmlJsDebugClient;

View File

@@ -71,7 +71,7 @@ ClientProxy::~ClientProxy()
void ClientProxy::connectToServer() void ClientProxy::connectToServer()
{ {
m_engineClient = new QDeclarativeEngineDebug(m_adapter.data()->connection(), this); m_engineClient = new QmlEngineDebugClient(m_adapter.data()->connection());
connect(m_engineClient, SIGNAL(newObjects()), this, SLOT(newObjects())); connect(m_engineClient, SIGNAL(newObjects()), this, SLOT(newObjects()));
connect(m_engineClient, SIGNAL(statusChanged(QDeclarativeDebugClient::Status)), connect(m_engineClient, SIGNAL(statusChanged(QDeclarativeDebugClient::Status)),
@@ -127,7 +127,7 @@ void ClientProxy::clientStatusChanged(QDeclarativeDebugClient::Status status)
void ClientProxy::engineClientStatusChanged(QDeclarativeDebugClient::Status status) void ClientProxy::engineClientStatusChanged(QDeclarativeDebugClient::Status status)
{ {
if (status == QDeclarativeDebugClient::Enabled) { if (status == QDeclarativeDebugClient::Enabled) {
m_adapter.data()->setEngineDebugClient(qobject_cast<QDeclarativeEngineDebug *>(sender())); m_adapter.data()->setEngineDebugClient(qobject_cast<QmlEngineDebugClient *>(sender()));
} }
} }

View File

@@ -167,7 +167,7 @@ private:
void buildDebugIdHashRecursive(const QDeclarativeDebugObjectReference &ref); void buildDebugIdHashRecursive(const QDeclarativeDebugObjectReference &ref);
QWeakPointer<Debugger::QmlAdapter> m_adapter; QWeakPointer<Debugger::QmlAdapter> m_adapter;
QDeclarativeEngineDebug *m_engineClient; QmlEngineDebugClient *m_engineClient;
QmlJSInspectorClient *m_inspectorClient; QmlJSInspectorClient *m_inspectorClient;
QDeclarativeDebugEnginesQuery *m_engineQuery; QDeclarativeDebugEnginesQuery *m_engineQuery;

View File

@@ -32,7 +32,7 @@
#ifndef QMLJSPRIVATEAPI_H #ifndef QMLJSPRIVATEAPI_H
#define QMLJSPRIVATEAPI_H #define QMLJSPRIVATEAPI_H
#include <qmljsdebugclient/qdeclarativeenginedebug.h> #include <qmljsdebugclient/qmlenginedebugclient.h>
#include <qmljsdebugclient/qdeclarativedebugclient.h> #include <qmljsdebugclient/qdeclarativedebugclient.h>
using namespace QmlJsDebugClient; using namespace QmlJsDebugClient;