summaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger
diff options
context:
space:
mode:
authorLasse Holmstedt <lasse.holmstedt@nokia.com>2010-07-09 09:37:48 (GMT)
committerLasse Holmstedt <lasse.holmstedt@nokia.com>2010-07-09 11:03:26 (GMT)
commite55781212532e2abcdd1cef8548b146fb14f0713 (patch)
treede556bc61a3e9a9b4fc8adce468810933128b3b6 /src/declarative/debugger
parent74a248462ef36f7784fd0816ee08030412459930 (diff)
downloadQt-e55781212532e2abcdd1cef8548b146fb14f0713.zip
Qt-e55781212532e2abcdd1cef8548b146fb14f0713.tar.gz
Qt-e55781212532e2abcdd1cef8548b146fb14f0713.tar.bz2
Resetting bindings through debugger interface
Reviewed-by: Aaron Kennedy
Diffstat (limited to 'src/declarative/debugger')
-rw-r--r--src/declarative/debugger/qdeclarativedebug.cpp15
-rw-r--r--src/declarative/debugger/qdeclarativedebug_p.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/src/declarative/debugger/qdeclarativedebug.cpp b/src/declarative/debugger/qdeclarativedebug.cpp
index 0c0cf2e..b950aef 100644
--- a/src/declarative/debugger/qdeclarativedebug.cpp
+++ b/src/declarative/debugger/qdeclarativedebug.cpp
@@ -579,6 +579,21 @@ bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QStri
}
}
+bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName)
+{
+ Q_D(QDeclarativeEngineDebug);
+
+ if (d->client->isConnected() && objectDebugId != -1) {
+ QByteArray message;
+ QDataStream ds(&message, QIODevice::WriteOnly);
+ ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName;
+ d->client->sendMessage(message);
+ return true;
+ } else {
+ return false;
+ }
+}
+
bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &methodName,
const QString &methodBody)
{
diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h
index 9c38184..2e79c5d 100644
--- a/src/declarative/debugger/qdeclarativedebug_p.h
+++ b/src/declarative/debugger/qdeclarativedebug_p.h
@@ -96,6 +96,7 @@ public:
QObject *parent = 0);
bool setBindingForObject(int objectDebugId, const QString &propertyName,
const QVariant &bindingExpression, bool isLiteralValue);
+ bool resetBindingForObject(int objectDebugId, const QString &propertyName);
bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody);
private: