aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-16 10:29:29 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-27 06:33:27 +0000
commit0e14a46f60124d9da1101fe7766c7d85e2b72e64 (patch)
treeefb39fcd3950619220bb927c84c174718e38415c /src/qml/qml/qqmlboundsignal.cpp
parentf8a104432051d182dfc880cea0d4931fcd229204 (diff)
Move m_function into the base class
Change-Id: I2ebc0ac8f5085157f5d1ec71a1b75559c6a46f8b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index 5cfccd2f80..77dccf6f04 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -84,10 +84,11 @@ QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index,
QQmlBoundSignalExpression::QQmlBoundSignalExpression(QObject *target, int index, QQmlContextData *ctxt, QObject *scope, const QV4::Value &function)
: QQmlJavaScriptExpression(),
m_index(index),
- m_function(function.as<QV4::Object>()->engine(), function),
m_target(target),
m_extra(0)
{
+ m_function.set(function.as<QV4::Object>()->engine(), function);
+
setExpressionFunctionValid(true);
setInvalidParameterName(false);
@@ -248,7 +249,6 @@ void QQmlBoundSignalExpression::evaluate(void **a)
int *argsTypes = QQmlMetaObject(m_target).methodParameterTypes(methodIndex, dummy, 0);
int argCount = argsTypes ? *argsTypes : 0;
- QV4::ScopedValue f(scope, m_function.value());
QV4::ScopedCallData callData(scope, argCount);
for (int ii = 0; ii < argCount; ++ii) {
int type = argsTypes[ii + 1];
@@ -272,7 +272,7 @@ void QQmlBoundSignalExpression::evaluate(void **a)
}
}
- QQmlJavaScriptExpression::evaluate(f, callData, 0);
+ QQmlJavaScriptExpression::evaluate(callData, 0);
}
ep->dereferenceScarceResources(); // "release" scarce resources if top-level expression evaluation is complete.
}