From 7cc777265b5d6c5e87c86283b4061f2632952a8c Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Wed, 10 Nov 2010 14:42:24 +0100 Subject: QDeclarativeDebug: Keep source information when changing an expression Copy over the source code location of an expression when it is changed throu the debugging facilities. This enables JavaScript breakpoints to be hit even after the source code of the function has changed. Task-number: QTCREATORBUG-2824 Reviewed-by: Kai Koehne --- src/declarative/qml/qdeclarativeenginedebug.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index ed28185..bffe681 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -502,7 +502,8 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId, property.write(expression); } else if (hasValidSignal(object, propertyName)) { QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString()); - QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); + QDeclarativeExpression *oldExpression = QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); + declarativeExpression->setSourceLocation(oldExpression->sourceFile(), oldExpression->lineNumber()); } else if (property.isProperty()) { QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context); binding->setTarget(property); -- cgit v0.12