aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlbinding.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-12-05 14:31:50 +0100
committerLars Knoll <lars.knoll@qt.io>2016-12-09 14:02:26 +0000
commitb45ebc6f456cf26912b14bb3809d14d696d9809a (patch)
tree43be87e1b24071ef85b0564283bb914416b0a00c /src/qml/qml/qqmlbinding.cpp
parenta11be5881a38933d36facfbc4f8baa1becd22546 (diff)
Avoid passing a FunctionObject to QQmlBinding::create()
Like this we can remove the QQmlBinding::create() overload that takes a FunctionObject. Change-Id: Ib6c37395ded325e68cf0fbf3afd08fb6dd6efa3b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding.cpp')
-rw-r--r--src/qml/qml/qqmlbinding.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp
index f85680f080..ab6cb60c7b 100644
--- a/src/qml/qml/qqmlbinding.cpp
+++ b/src/qml/qml/qqmlbinding.cpp
@@ -110,21 +110,8 @@ QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QString
return b;
}
-QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, const QV4::FunctionObject *function, QObject *obj, QQmlContextData *ctxt)
-{
- QQmlBinding *b = newBinding(QQmlEnginePrivate::get(ctxt), property);
-
- b->setNotifyOnValueChanged(true);
- b->QQmlJavaScriptExpression::setContext(ctxt);
- b->setScopeObject(obj);
-
- b->setFunctionObject(function);
-
- return b;
-}
-
QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, QV4::Function *function,
- QObject *obj, QQmlContextData *ctxt, QV4::QmlContext *sharedContext)
+ QObject *obj, QQmlContextData *ctxt, QV4::ExecutionContext *scope)
{
QQmlBinding *b = newBinding(QQmlEnginePrivate::get(ctxt), property);
@@ -132,8 +119,8 @@ QQmlBinding *QQmlBinding::create(const QQmlPropertyData *property, QV4::Function
b->QQmlJavaScriptExpression::setContext(ctxt);
b->setScopeObject(obj);
- Q_ASSERT(sharedContext);
- b->setupFunction(sharedContext, function);
+ Q_ASSERT(scope);
+ b->setupFunction(scope, function);
return b;
}