aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index 68160edf5e..bc56fe1f2d 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -136,6 +136,17 @@ QString QQmlBoundSignalExpression::expression() const
}
}
+QV4::Function *QQmlBoundSignalExpression::function() const
+{
+ if (m_expressionFunctionValid) {
+ Q_ASSERT (context() && engine());
+ QV4::Scope scope(QQmlEnginePrivate::get(engine())->v4engine());
+ QV4::Scoped<QV4::FunctionObject> v(scope, m_v8function.value());
+ return v ? v->function : 0;
+ }
+ return 0;
+}
+
// Parts of this function mirror code in QQmlExpressionPrivate::value() and v8value().
// Changes made here may need to be made there and vice versa.
void QQmlBoundSignalExpression::evaluate(void **a)