summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativeconnections.cpp
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-02-04 13:55:50 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-02-04 13:55:50 (GMT)
commit47322c3e9eddeeb68d49445507af2d7cf154f3c7 (patch)
treed86c24071d4aaaa1ded75e5d6ee6682f9cb34847 /src/declarative/util/qdeclarativeconnections.cpp
parent5ee75c4a483405180788b5a4986dce2cf9360d86 (diff)
parentbc331aca61a2f212a347708c9d44a4fb092183fd (diff)
downloadQt-47322c3e9eddeeb68d49445507af2d7cf154f3c7.zip
Qt-47322c3e9eddeeb68d49445507af2d7cf154f3c7.tar.gz
Qt-47322c3e9eddeeb68d49445507af2d7cf154f3c7.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Diffstat (limited to 'src/declarative/util/qdeclarativeconnections.cpp')
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
index e986ac9..5a66aab 100644
--- a/src/declarative/util/qdeclarativeconnections.cpp
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -45,6 +45,7 @@
#include <qdeclarativeproperty_p.h>
#include <qdeclarativeboundsignal_p.h>
#include <qdeclarativecontext.h>
+#include <qdeclarativecontext_p.h>
#include <qdeclarativeinfo.h>
#include <QtCore/qdebug.h>
@@ -257,7 +258,11 @@ void QDeclarativeConnections::connectSignals()
if (prop.isValid() && (prop.type() & QDeclarativeProperty::SignalProperty)) {
QDeclarativeBoundSignal *signal =
new QDeclarativeBoundSignal(target(), prop.method(), this);
- signal->setExpression(new QDeclarativeExpression(qmlContext(this), 0, script));
+ QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(this), 0, script);
+ QDeclarativeData *ddata = QDeclarativeData::get(this);
+ if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
+ expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
+ signal->setExpression(expression);
d->boundsignals += signal;
} else {
if (!d->ignoreUnknownSignals)