Emit connectNotify with real signal name.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
Renato Filho 2010-07-29 13:53:47 -03:00
commit 1fe7baf787

View file

@ -76,11 +76,11 @@ static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject
} }
if (QMetaObject::connect(source, signalIndex, receiver, slotIndex, type)) { if (QMetaObject::connect(source, signalIndex, receiver, slotIndex, type)) {
#ifndef AVOID_PROTECTED_HACK #ifndef AVOID_PROTECTED_HACK
source->connectNotify(signal); source->connectNotify(signal - 1);
#else #else
// Need to cast to QObjectWrapper* and call the public version of // Need to cast to QObjectWrapper* and call the public version of
// connectNotify when avoiding the protected hack. // connectNotify when avoiding the protected hack.
reinterpret_cast<QObjectWrapper*>(source)->connectNotify(signal); reinterpret_cast<QObjectWrapper*>(source)->connectNotify(signal - 1);
#endif #endif
if (usingGlobalReceiver) if (usingGlobalReceiver)
signalManager.globalReceiverConnectNotify(source, slotIndex); signalManager.globalReceiverConnectNotify(source, slotIndex);