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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index 97ccb1969b..9e1e056381 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -190,11 +190,11 @@ void QQmlBoundSignalExpression::evaluate(void **a)
QQmlMetaObject::ArgTypeStorage storage;
//TODO: lookup via signal index rather than method index as an optimization
int methodIndex = QMetaObjectPrivate::signal(m_target->metaObject(), m_index).methodIndex();
- int *argsTypes = QQmlMetaObject(m_target).methodParameterTypes(methodIndex, &storage, nullptr);
- int argCount = argsTypes ? *argsTypes : 0;
+ bool ok = QQmlMetaObject(m_target).methodParameterTypes(methodIndex, &storage, nullptr);
+ const int argCount = ok ? storage.size() : 0;
QV4::JSCallData jsCall(scope, argCount);
- populateJSCallArguments(v4, jsCall, a, argsTypes);
+ populateJSCallArguments(v4, jsCall, argCount, a, storage.constData());
QQmlJavaScriptExpression::evaluate(jsCall.callData(), nullptr);