Don't call metaObject() redundantly

The desired meta-object is already stored in a local variable.

Change-Id: I40c7840f07f5dbd67110e2f7d5bb618cbb269047
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Kent Hansen 2012-05-27 22:23:50 +02:00 committed by Qt by Nokia
parent d0c0360392
commit ec508e9a6a

View File

@ -3220,7 +3220,7 @@ void QMetaObject::connectSlotsByName(QObject *o)
if (sigIndex < 0) { // search for compatible signals if (sigIndex < 0) { // search for compatible signals
const QMetaObject *smo = co->metaObject(); const QMetaObject *smo = co->metaObject();
int slotlen = qstrlen(slot + len + 4) - 1; int slotlen = qstrlen(slot + len + 4) - 1;
for (int k = 0; k < co->metaObject()->methodCount(); ++k) { for (int k = 0; k < smo->methodCount(); ++k) {
QMetaMethod method = smo->method(k); QMetaMethod method = smo->method(k);
if (method.methodType() != QMetaMethod::Signal) if (method.methodType() != QMetaMethod::Signal)
continue; continue;