summaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger/qdeclarativeenginedebug.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@digia.com>2012-09-28 13:01:08 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-02 08:28:24 (GMT)
commit32ea47c54efbe497927abb49fc4de54348d2db69 (patch)
treeb21bbbdaf34ed48fa77c6fee9d02669820a3deea /src/declarative/debugger/qdeclarativeenginedebug.cpp
parent4679c6901fc7c388fdf6c022d3499708222ef1f1 (diff)
downloadQt-32ea47c54efbe497927abb49fc4de54348d2db69.zip
Qt-32ea47c54efbe497927abb49fc4de54348d2db69.tar.gz
Qt-32ea47c54efbe497927abb49fc4de54348d2db69.tar.bz2
EngineDebug: Updated and renamed service
Updated service to include parent ids. Since this will break client compatibility, the service has been renamed to 'DeclarativeDebugger' from 'QDeclarativeEngine'. This is effectively a backport of the 'QmlDebugger' service from Qt5. Change-Id: Ic3000712d986e19bdf89417e9c4c23229d56f9dc Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'src/declarative/debugger/qdeclarativeenginedebug.cpp')
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebug.cpp36
1 files changed, 26 insertions, 10 deletions
diff --git a/src/declarative/debugger/qdeclarativeenginedebug.cpp b/src/declarative/debugger/qdeclarativeenginedebug.cpp
index d2937ef..ebc3b0f 100644
--- a/src/declarative/debugger/qdeclarativeenginedebug.cpp
+++ b/src/declarative/debugger/qdeclarativeenginedebug.cpp
@@ -96,7 +96,7 @@ public:
QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client,
QDeclarativeEngineDebugPrivate *p)
-: QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p)
+: QDeclarativeDebugClient(QLatin1String("DeclarativeDebugger"), client), priv(p)
{
}
@@ -217,6 +217,8 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugOb
o.m_source.m_lineNumber = data.lineNumber;
o.m_source.m_columnNumber = data.columnNumber;
o.m_contextDebugId = data.contextId;
+ o.m_parentId = data.parentId;
+ o.m_needsMoreData = simple;
if (simple)
return;
@@ -246,6 +248,7 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugOb
case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Basic:
case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::List:
case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::SignalProperty:
+ case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Variant:
{
prop.m_value = data.value;
break;
@@ -646,7 +649,8 @@ bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QStri
if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line;
+ ds << QByteArray("SET_BINDING") << d->getId() << objectDebugId << propertyName <<
+ bindingExpression << isLiteralValue << source << line;
d->client->sendMessage(message);
return true;
} else {
@@ -661,7 +665,7 @@ bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QSt
if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName;
+ ds << QByteArray("RESET_BINDING") << d->getId() << objectDebugId << propertyName;
d->client->sendMessage(message);
return true;
} else {
@@ -677,7 +681,8 @@ bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &me
if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
QByteArray message;
QDataStream ds(&message, QIODevice::WriteOnly);
- ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody;
+ ds << QByteArray("SET_METHOD_BODY") << d->getId() << objectDebugId << methodName
+ << methodBody;
d->client->sendMessage(message);
return true;
} else {
@@ -866,27 +871,28 @@ QString QDeclarativeDebugEngineReference::name() const
}
QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference()
-: m_debugId(-1), m_contextDebugId(-1)
+ : m_debugId(-1), m_parentId(-1), m_contextDebugId(-1), m_needsMoreData(false)
{
}
QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(int debugId)
-: m_debugId(debugId), m_contextDebugId(-1)
+: m_debugId(debugId), m_parentId(-1), m_contextDebugId(-1), m_needsMoreData(false)
{
}
QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &o)
-: m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString),
+: m_debugId(o.m_debugId), m_parentId(o.m_parentId), m_class(o.m_class), m_idString(o.m_idString),
m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId),
- m_properties(o.m_properties), m_children(o.m_children)
+ m_needsMoreData(o.m_needsMoreData), m_properties(o.m_properties), m_children(o.m_children)
{
}
QDeclarativeDebugObjectReference &
QDeclarativeDebugObjectReference::operator=(const QDeclarativeDebugObjectReference &o)
{
- m_debugId = o.m_debugId; m_class = o.m_class; m_idString = o.m_idString;
- m_name = o.m_name; m_source = o.m_source; m_contextDebugId = o.m_contextDebugId;
+ m_debugId = o.m_debugId; m_parentId = o.m_parentId; m_class = o.m_class;
+ m_idString = o.m_idString; m_name = o.m_name; m_source = o.m_source;
+ m_contextDebugId = o.m_contextDebugId; m_needsMoreData = o.m_needsMoreData;
m_properties = o.m_properties; m_children = o.m_children;
return *this;
}
@@ -896,6 +902,11 @@ int QDeclarativeDebugObjectReference::debugId() const
return m_debugId;
}
+int QDeclarativeDebugObjectReference::parentId() const
+{
+ return m_parentId;
+}
+
QString QDeclarativeDebugObjectReference::className() const
{
return m_class;
@@ -921,6 +932,11 @@ int QDeclarativeDebugObjectReference::contextDebugId() const
return m_contextDebugId;
}
+bool QDeclarativeDebugObjectReference::needsMoreData() const
+{
+ return m_needsMoreData;
+}
+
QList<QDeclarativeDebugPropertyReference> QDeclarativeDebugObjectReference::properties() const
{
return m_properties;