aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmljavascriptexpression.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-11-04 02:48:16 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-05 23:47:27 +0100
commit3a61da32e485621c9afbd453d22cbe1f6c25479e (patch)
tree7c7b145758c0370b23b0287f33d1124ae1d49660 /src/qml/qml/qqmljavascriptexpression.cpp
parent22b83ec28a7dfebe9d47ff5c98fddfdb492e4304 (diff)
Ensure the this object is set correctly to the scope object in binding expressions
This is a regression from 5.1 Change-Id: I61ad372a02d937c195dad74bd9fcb8fd4410d97a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression.cpp')
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 53b7504196..3fd0003656 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -156,8 +156,8 @@ QV4::ReturnedValue QQmlJavaScriptExpression::evaluate(QQmlContextData *context,
QV4::Scope scope(v4);
QV4::ScopedValue result(scope, QV4::Primitive::undefinedValue());
QV4::ExecutionContext *ctx = v4->current;
- callData->thisObject = ep->v8engine()->global();
- if (scopeObject() && requiresThisObject()) {
+ callData->thisObject = v4->globalObject;
+ if (scopeObject()) {
QV4::ScopedValue value(scope, QV4::QObjectWrapper::wrap(ctx->engine, scopeObject()));
if (value->isObject())
callData->thisObject = value;