diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-04-15 12:13:07 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-04-16 16:52:19 -0300 |
commit | de4a1a10b01f54ce03bc484f04f4294ba8b4d314 (patch) | |
tree | dc429c094b49ecdc1e345987c234043ed860650f /libpyside/signalmanager.cpp | |
parent | 2de4b9385917ff3d0616cf9967295d412f89297f (diff) |
Fixed bug with refcount on PyObject args during signal/slot emission.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'libpyside/signalmanager.cpp')
-rw-r--r-- | libpyside/signalmanager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libpyside/signalmanager.cpp b/libpyside/signalmanager.cpp index 3e5e3c07c..9cdcca1f6 100644 --- a/libpyside/signalmanager.cpp +++ b/libpyside/signalmanager.cpp @@ -59,7 +59,8 @@ struct PyObjectWrapper { PyObject* m_me; - PyObjectWrapper(PyObject* me) : m_me(me) {} + PyObjectWrapper(const PyObjectWrapper &other) : m_me(other.m_me) {} + PyObjectWrapper(PyObject* me) : m_me(me) { Py_INCREF(m_me); } PyObjectWrapper() : m_me(Py_None) {} operator PyObject*() const { return m_me; } }; @@ -310,7 +311,7 @@ bool SignalManager::emitSignal(QObject* source, const char* signal, PyObject* ar else return emitNormalSignal(source, signalIndex, signal, args, argTypes); } - qWarning() << "Signal" << signal << "not found, probably a typo or you are emitting a dynamic signal that has never been used in a connection until now."; + qDebug() << "Signal" << signal << "not found, probably a typo or you are emitting a dynamic signal that has never been used in a connection until now."; return false; } |