aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2016-01-22 15:20:47 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-01-22 15:21:06 +0100
commitf286db98ee41a8aa71b9a65a235b6d3e265d79f4 (patch)
tree16e17d4c52d35f7e55fc2103db5c96850e9bdfff /src/qml/qml/qqmlboundsignal.cpp
parentce093497f2d4164fa8abc06cf976f9e36798e11e (diff)
parentb60a5dc9405ce89d7a742abc81b906d5c8cf5f7d (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index f2acc7352c..9879763c72 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -245,6 +245,28 @@ void QQmlBoundSignalExpression::evaluate(void **a)
ep->dereferenceScarceResources(); // "release" scarce resources if top-level expression evaluation is complete.
}
+void QQmlBoundSignalExpression::evaluate(const QList<QVariant> &args)
+{
+ Q_ASSERT (context() && engine());
+
+ if (!expressionFunctionValid())
+ return;
+
+ QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine());
+ QV4::Scope scope(ep->v4engine());
+
+ ep->referenceScarceResources(); // "hold" scarce resources in memory during evaluation.
+
+ QV4::ScopedCallData callData(scope, args.count());
+ for (int ii = 0; ii < args.count(); ++ii) {
+ callData->args[ii] = scope.engine->fromVariant(args[ii]);
+ }
+
+ QQmlJavaScriptExpression::evaluate(callData, 0);
+
+ ep->dereferenceScarceResources(); // "release" scarce resources if top-level expression evaluation is complete.
+}
+
////////////////////////////////////////////////////////////////////////