summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativestateoperations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qdeclarativestateoperations.cpp')
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 410a269..0521d27 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -49,6 +49,7 @@
#include <qdeclarativeitem_p.h>
#include <qdeclarativeguard_p.h>
#include <qdeclarativenullablevalue_p_p.h>
+#include "private/qdeclarativecontext_p.h"
#include <QtCore/qdebug.h>
#include <QtGui/qgraphicsitem.h>
@@ -571,7 +572,12 @@ void QDeclarativeStateChangeScript::execute()
const QString &script = d->script.script();
if (!script.isEmpty()) {
QDeclarativeExpression expr(d->script.context(), script, d->script.scopeObject());
+ QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(this);
+ if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty())
+ expr.setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber);
expr.value();
+ if (expr.hasError())
+ qWarning() << expr.error();
}
}