summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorChristiaan Janssen <christiaan.janssen@nokia.com>2010-11-10 13:42:24 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2010-11-10 13:43:06 (GMT)
commit7cc777265b5d6c5e87c86283b4061f2632952a8c (patch)
tree1062534898a38dd707ed346653061d2a37d25b40 /src/declarative
parentd19717e909a2f1f8e5ed11e27fb3b9a3f7792931 (diff)
downloadQt-7cc777265b5d6c5e87c86283b4061f2632952a8c.zip
Qt-7cc777265b5d6c5e87c86283b4061f2632952a8c.tar.gz
Qt-7cc777265b5d6c5e87c86283b4061f2632952a8c.tar.bz2
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
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp3
1 files changed, 2 insertions, 1 deletions
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);