Use QMetaMethod::isValid() to check method validity
The signature() method will soon be replaced by a function that returns a QByteArray rather than a pointer, and calling it will be more expensive than calling isValid(). Plus, isValid() looks nicer. Change-Id: I6844988c84dcadf876fc86bc71c8b310a21f88de Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>bb10
parent
5640b0b443
commit
989670737f
|
|
@ -76,7 +76,7 @@ static void qSignalDumperCallback(QObject *caller, int method_index, void **argv
|
|||
const QMetaObject *mo = caller->metaObject();
|
||||
Q_ASSERT(mo);
|
||||
QMetaMethod member = mo->method(method_index);
|
||||
Q_ASSERT(member.signature());
|
||||
Q_ASSERT(member.isValid());
|
||||
|
||||
if (QTest::ignoreClasses() && QTest::ignoreClasses()->contains(mo->className())) {
|
||||
++QTest::ignoreLevel;
|
||||
|
|
@ -132,7 +132,7 @@ static void qSignalDumperCallbackSlot(QObject *caller, int method_index, void **
|
|||
const QMetaObject *mo = caller->metaObject();
|
||||
Q_ASSERT(mo);
|
||||
QMetaMethod member = mo->method(method_index);
|
||||
if (!member.signature())
|
||||
if (!member.isValid())
|
||||
return;
|
||||
|
||||
if (QTest::ignoreLevel ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue