aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlbinding.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-12-05 12:42:41 +0100
committerLars Knoll <lars.knoll@qt.io>2016-12-09 14:01:57 +0000
commit82ee8341fba141e2e1e44948d2161a694add1584 (patch)
tree2e23b8101e996a5f462575105be2864a50b3db33 /src/qml/qml/qqmlbinding.cpp
parentbf661342652b02177fc1a5cd29195a443dac5bc1 (diff)
Get rid of FunctionObject::createQmlFunction
Instead, simply create a QmlContext, and setup the bindings with the QV4::Function itself. Change-Id: I9db93b15112e43a6d5e275d126fb20f9c8833e8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r--src/qml/qml/qqmlbinding.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index aabdf00f6e..f85680f080 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -86,8 +86,8 @@ QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QQmlScr
QV4::ExecutionEngine *v4 = QQmlEnginePrivate::get(b->context()->engine)->v4engine();
if (runtimeFunction) {
QV4::Scope scope(v4);
- QV4::ScopedFunctionObject f(scope, QV4::FunctionObject::createQmlFunction(ctxtdata, b->scopeObject(), runtimeFunction));
- b->setFunctionObject(f);
+ QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(v4->rootContext(), ctxtdata, b->scopeObject()));
+ b->setupFunction(qmlContext, runtimeFunction);
} else {
QString code = scriptPrivate->script;
b->createQmlBinding(b->context(), b->scopeObject(), code, url, scriptPrivate->lineNumber);