diff options
author | David Boddie <david.boddie@nokia.com> | 2011-02-04 13:55:50 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-02-04 13:55:50 (GMT) |
commit | 47322c3e9eddeeb68d49445507af2d7cf154f3c7 (patch) | |
tree | d86c24071d4aaaa1ded75e5d6ee6682f9cb34847 /src/declarative/util/qdeclarativeconnections.cpp | |
parent | 5ee75c4a483405180788b5a4986dce2cf9360d86 (diff) | |
parent | bc331aca61a2f212a347708c9d44a4fb092183fd (diff) | |
download | Qt-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.cpp | 7 |
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) |