diff --git a/src/libs/qmljs/qmljsdelta.cpp b/src/libs/qmljs/qmljsdelta.cpp index f6ea600aac5..83ae5877b94 100644 --- a/src/libs/qmljs/qmljsdelta.cpp +++ b/src/libs/qmljs/qmljsdelta.cpp @@ -460,6 +460,9 @@ Delta::DebugIdMap Delta::operator()(const Document::Ptr &doc1, const Document::P Q_ASSERT(doc1->qmlProgram()); Q_ASSERT(doc2->qmlProgram()); + m_previousDoc = doc1; + m_currentDoc = doc2; + Delta::DebugIdMap newDebuggIds; Map M = buildMapping(doc1, doc2); diff --git a/src/libs/qmljsdebugclient/qdeclarativedebug.cpp b/src/libs/qmljsdebugclient/qdeclarativedebug.cpp index 5993efd00dd..029a2372187 100644 --- a/src/libs/qmljsdebugclient/qdeclarativedebug.cpp +++ b/src/libs/qmljsdebugclient/qdeclarativedebug.cpp @@ -670,14 +670,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 { diff --git a/src/libs/qmljsdebugclient/qdeclarativedebug_p.h b/src/libs/qmljsdebugclient/qdeclarativedebug_p.h index d7fb38fd430..f431905d5e1 100644 --- a/src/libs/qmljsdebugclient/qdeclarativedebug_p.h +++ b/src/libs/qmljsdebugclient/qdeclarativedebug_p.h @@ -90,7 +90,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); diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp index 2cec5a62b5a..780825441a4 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp +++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp @@ -250,7 +250,9 @@ QList ClientProxy::objectReferences(const QDec bool ClientProxy::setBindingForObject(int objectDebugId, const QString &propertyName, const QVariant &value, - bool isLiteralValue) + bool isLiteralValue, + QString source, + int line) { if (objectDebugId == -1) return false; @@ -263,7 +265,7 @@ bool ClientProxy::setBindingForObject(int objectDebugId, log(LogSend, QString("SET_BINDING %1 %2 %3 %4").arg(QString::number(objectDebugId), propertyName, value.toString(), QString(isLiteralValue ? "true" : "false"))); - bool result = m_engineClient->setBindingForObject(objectDebugId, propertyName, value.toString(), isLiteralValue); + bool result = m_engineClient->setBindingForObject(objectDebugId, propertyName, value.toString(), isLiteralValue, source, line); if (!result) log(LogSend, QString("failed!")); diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.h b/src/plugins/qmljsinspector/qmljsclientproxy.h index 8b6f6f2b726..344c7bcf8fa 100644 --- a/src/plugins/qmljsinspector/qmljsclientproxy.h +++ b/src/plugins/qmljsinspector/qmljsclientproxy.h @@ -62,7 +62,9 @@ public: bool setBindingForObject(int objectDebugId, const QString &propertyName, const QVariant &value, - bool isLiteralValue); + bool isLiteralValue, + QString source, + int line); bool setMethodBodyForObject(int objectDebugId, const QString &methodName, const QString &methodBody); bool resetBindingForObject(int objectDebugId, const QString &propertyName); diff --git a/src/plugins/qmljsinspector/qmljslivetextpreview.cpp b/src/plugins/qmljsinspector/qmljslivetextpreview.cpp index bbf995006e1..e9cbccc6b72 100644 --- a/src/plugins/qmljsinspector/qmljslivetextpreview.cpp +++ b/src/plugins/qmljsinspector/qmljslivetextpreview.cpp @@ -463,7 +463,7 @@ protected: if (isLiteral) expr = castToLiteral(scriptCode, scriptBinding); appliedChangesToViewer = true; - m_clientProxy->setBindingForObject(debugId, propertyName, expr, isLiteral); + m_clientProxy->setBindingForObject(debugId, propertyName, expr, isLiteral, document()->fileName(), scriptBinding->firstSourceLocation().startLine); } virtual void resetBindingForObject(int debugId, const QString &propertyName)