From d475e72dc469dc6d442a36588e19a3e7eca48394 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 10 Jun 2015 14:22:08 +0200 Subject: Smaller cleanup to QQmlJavaScriptExpression Clean up some of the code to create binding expressions. Change-Id: I1cd826685713b44166c58b114fa91135a664591d Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlexpression.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/qml/qml/qqmlexpression.cpp') diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp index e4a36f7580..332b99ee8f 100644 --- a/src/qml/qml/qqmlexpression.cpp +++ b/src/qml/qml/qqmlexpression.cpp @@ -241,12 +241,8 @@ void QQmlExpression::setExpression(const QString &expression) // Must be called with a valid handle scope QV4::ReturnedValue QQmlExpressionPrivate::v4value(bool *isUndefined) { - Q_Q(QQmlExpression); - - QV4::ExecutionEngine *v4 = QQmlEnginePrivate::get(q->engine())->v4engine(); - if (!expressionFunctionValid) { - m_function.set(v4, qmlBinding(context(), scopeObject(), expression, url, line)); + createQmlBinding(context(), scopeObject(), expression, url, line); expressionFunctionValid = true; } -- cgit v1.2.3