aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 0a05c50432..5cd0443b71 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -956,6 +956,9 @@ ReturnedValue Runtime::callQmlScopeObjectProperty(ExecutionEngine *engine, int p
QString error = QStringLiteral("Property '%1' of scope object is not a function").arg(propertyIndex);
return engine->throwTypeError(error);
}
+
+ QObject *scopeObj = static_cast<const QmlContext &>(callData->thisObject).d()->qml->scopeObject;
+ callData->thisObject = QObjectWrapper::wrap(engine, scopeObj);
return o->call(callData);
}
@@ -968,6 +971,8 @@ ReturnedValue Runtime::callQmlContextObjectProperty(ExecutionEngine *engine, int
return engine->throwTypeError(error);
}
+ QObject *contextObject = static_cast<const QmlContext &>(callData->thisObject).d()->qml->context->contextObject;
+ callData->thisObject = QObjectWrapper::wrap(engine, contextObject);
return o->call(callData);
}