aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-11-14 21:39:08 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-23 14:51:04 +0100
commitc9adc7661a7eef4f2eefb51f02c0393be2ec3898 (patch)
tree0f88e9f0cb8784e28982c56c2ba393fb886614c8 /src/qml/qml/qqmlboundsignal.cpp
parente66cf24a8dfd010bf43b7ed92c8f5679ea848c0b (diff)
Move methodParameterTypes and methodReturnType helper functions
These can extract the type information from either a property cache (through QQmlData from a QObject) or (fallback) from a QMetaObject. The difference between a QMetaObject and a QQmlPropertyCache is what QQmlMetaObject abstracts and therefore we can move the functions there. This is in preparation for gadget support and also avoids the repeated QQmlData::get() dance but allows the re-use of a QQmlMetaObject instance in the future to do that dance only once. Change-Id: Ibff6ce498d09fabc97e0801653edc5b1ff446c6a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index cabb76db48..f8718ad0ee 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -251,7 +251,7 @@ void QQmlBoundSignalExpression::evaluate(void **a)
QVarLengthArray<int, 9> dummy;
//TODO: lookup via signal index rather than method index as an optimization
int methodIndex = QMetaObjectPrivate::signal(m_target->metaObject(), m_index).methodIndex();
- int *argsTypes = QQmlPropertyCache::methodParameterTypes(m_target, methodIndex, dummy, 0);
+ int *argsTypes = QQmlMetaObject(m_target).methodParameterTypes(methodIndex, dummy, 0);
int argCount = argsTypes ? *argsTypes : 0;
QV4::ScopedValue f(scope, m_v8function.value());