summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-01-05 04:03:37 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-01-05 04:03:37 (GMT)
commit55abcc4711d2c0d6d6ec739b0e7ea97230d41b4a (patch)
tree1e3ca60b4607911d9722945a943c10d632c8f9ed /src/declarative/util
parentffd499eb6ff64df1833625f64dbbf92e0e0746d4 (diff)
parent810eb8e2bf52a30632abc42618b7f9f4352e2dd9 (diff)
downloadQt-55abcc4711d2c0d6d6ec739b0e7ea97230d41b4a.zip
Qt-55abcc4711d2c0d6d6ec739b0e7ea97230d41b4a.tar.gz
Qt-55abcc4711d2c0d6d6ec739b0e7ea97230d41b4a.tar.bz2
Merge branch 'qtquick11' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11
Diffstat (limited to 'src/declarative/util')
-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 15e5ac5..e102f2c 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)