summaryrefslogtreecommitdiffstats
path: root/libpyside
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-08-30 15:53:36 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2011-08-30 18:29:12 -0300
commit472f8b7a75ad7d71df47bdfa136f5d8ff1ba56f0 (patch)
treef0bc0a0f9755647e147bd8c8401ba3de72916664 /libpyside
parent779a1c7ba4038c618bd28291314f18ef72c371bf (diff)
downloadpyside-472f8b7a75ad7d71df47bdfa136f5d8ff1ba56f0.tar.gz
pyside-472f8b7a75ad7d71df47bdfa136f5d8ff1ba56f0.tar.xz
pyside-472f8b7a75ad7d71df47bdfa136f5d8ff1ba56f0.zip
Optimize my dumb code that do stuff with a QByteArray without knowing if will use it.
Diffstat (limited to 'libpyside')
-rw-r--r--libpyside/pysidesignal.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libpyside/pysidesignal.cpp b/libpyside/pysidesignal.cpp
index b4940d5..9b8cbc0 100644
--- a/libpyside/pysidesignal.cpp
+++ b/libpyside/pysidesignal.cpp
@@ -783,11 +783,12 @@ void registerSignals(SbkObjectType* pyObj, const QMetaObject* metaObject)
SignalSigMap signalsFound;
for(int i = metaObject->methodOffset(), max = metaObject->methodCount(); i < max; ++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(), ",");
+ }
}
SignalSigMap::Iterator it = signalsFound.begin();