diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-08-30 15:53:36 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:49 -0300 |
commit | f5f9c23c5f98ac3ce3afd4bf2de03259dff66553 (patch) | |
tree | 97b09c909a4d8776d37946a79734a7c2d37ad831 | |
parent | 49ad2f9c1de0c8877f72a92ffab47d2895a48839 (diff) |
Optimize my dumb code that do stuff with a QByteArray without knowing if will use it.
-rw-r--r-- | libpyside/pysidesignal.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libpyside/pysidesignal.cpp b/libpyside/pysidesignal.cpp index b4940d5e8..9b8cbc076 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(); |