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:
parent
95b6826ed4
commit
10384778d1
@ -1891,11 +1891,10 @@ void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalInd
|
|||||||
#endif
|
#endif
|
||||||
const QMetaObject *meta = sender->metaObject();
|
const QMetaObject *meta = sender->metaObject();
|
||||||
QMetaMethod method = meta->method(signalIndex);
|
QMetaMethod method = meta->method(signalIndex);
|
||||||
QList<QByteArray> parameterTypes = method.parameterTypes();
|
int argc = method.parameterCount();
|
||||||
int argc = parameterTypes.count();
|
|
||||||
QList<QVariant> vargs;
|
QList<QVariant> vargs;
|
||||||
for (int i = 0; i < argc; ++i) {
|
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]));
|
vargs.append(QVariant(type, argv[i+1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user