Optimize my dumb code that do stuff with a QByteArray without knowing if will use it.
This commit is contained in:
parent
49ad2f9c1d
commit
f5f9c23c5f
1 changed files with 4 additions and 3 deletions
|
|
@ -783,11 +783,12 @@ void registerSignals(SbkObjectType* pyObj, const QMetaObject* metaObject)
|
||||||
SignalSigMap signalsFound;
|
SignalSigMap signalsFound;
|
||||||
for(int i = metaObject->methodOffset(), max = metaObject->methodCount(); i < max; ++i) {
|
for(int i = metaObject->methodOffset(), max = metaObject->methodCount(); i < max; ++i) {
|
||||||
QMetaMethod method = metaObject->method(i);
|
QMetaMethod method = metaObject->method(i);
|
||||||
QByteArray methodName(method.signature());
|
|
||||||
methodName.chop(methodName.size() - methodName.indexOf('('));
|
|
||||||
|
|
||||||
if (method.methodType() == QMetaMethod::Signal)
|
if (method.methodType() == QMetaMethod::Signal) {
|
||||||
|
QByteArray methodName(method.signature());
|
||||||
|
methodName.chop(methodName.size() - methodName.indexOf('('));
|
||||||
signalsFound[methodName] << join(method.parameterTypes(), ",");
|
signalsFound[methodName] << join(method.parameterTypes(), ",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SignalSigMap::Iterator it = signalsFound.begin();
|
SignalSigMap::Iterator it = signalsFound.begin();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue