statemachine: Use new Qt5 api for obtaining method parameter types

This is much faster than the string-based api.

Change-Id: Id7ba76aee3346dd90412ec5c8505329360aae937
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
This commit is contained in:
Kent Hansen 2012-07-12 21:59:50 +02:00 committed by Qt by Nokia
parent 95b6826ed4
commit 10384778d1

View File

@ -1891,11 +1891,10 @@ void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalInd
#endif
const QMetaObject *meta = sender->metaObject();
QMetaMethod method = meta->method(signalIndex);
QList<QByteArray> parameterTypes = method.parameterTypes();
int argc = parameterTypes.count();
int argc = method.parameterCount();
QList<QVariant> vargs;
for (int i = 0; i < argc; ++i) {
int type = QMetaType::type(parameterTypes.at(i));
int type = method.parameterType(i);
vargs.append(QVariant(type, argv[i+1]));
}