From 10384778d1422b2491f39c6e07ccf7cb9ebbf576 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 12 Jul 2012 21:59:50 +0200 Subject: [PATCH] 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 --- src/corelib/statemachine/qstatemachine.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 72f4a123e6..de056aac8f 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -1891,11 +1891,10 @@ void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalInd #endif const QMetaObject *meta = sender->metaObject(); QMetaMethod method = meta->method(signalIndex); - QList parameterTypes = method.parameterTypes(); - int argc = parameterTypes.count(); + int argc = method.parameterCount(); QList 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])); }