QmlDebugger: adding slots to items in Live Preview
authorChristiaan Janssen <christiaan.janssen@nokia.com>
Mon, 30 May 2011 12:59:47 +0000 (14:59 +0200)
committerChristiaan Janssen <christiaan.janssen@nokia.com>
Mon, 30 May 2011 13:05:47 +0000 (15:05 +0200)
Reviewed-by: Kai Koehne
(reapplied commit 89d9b83aa26db4f528250c3fe4716b81955c6929 from qtcreator)

src/declarative/debugger/qdeclarativedebug.cpp
src/declarative/debugger/qdeclarativedebug_p.h

index 2b6df38..5b0bbd7 100644 (file)
@@ -594,14 +594,15 @@ QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult
 
 bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName,
                                                   const QVariant &bindingExpression,
-                                                  bool isLiteralValue)
+                                                  bool isLiteralValue,
+                                                  QString source, int line)
 {
     Q_D(QDeclarativeEngineDebug);
 
     if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) {
         QByteArray message;
         QDataStream ds(&message, QIODevice::WriteOnly);
-        ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue;
+        ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line;
         d->client->sendMessage(message);
         return true;
     } else {
index ae92d6a..f822637 100644 (file)
@@ -101,7 +101,8 @@ public:
                                                    const QString &expr,
                                                    QObject *parent = 0);
     bool setBindingForObject(int objectDebugId, const QString &propertyName,
-                             const QVariant &bindingExpression, bool isLiteralValue);
+                             const QVariant &bindingExpression, bool isLiteralValue,
+                             QString source = QString(), int line = -1);
     bool resetBindingForObject(int objectDebugId, const QString &propertyName);
     bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody);