diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-08 16:34:52 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-04-08 17:14:14 -0300 |
commit | f8907f4e4ed306f07c28d285d2d46bd2b43ea19b (patch) | |
tree | 530d34003e29a3d21d638ed2bb8118f33499da6f /PySide/QtCore | |
parent | bd8d5dabb334d16ccfdb76fe0fb8d083be2c0219 (diff) |
Fix bug#210, "Can't connect generic callable objects as a slot".
Reviewer: Bruno Araújo <bruno.araujo@openbossa.org>
Reviewer: Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'PySide/QtCore')
-rw-r--r-- | PySide/QtCore/glue/qobject_connect.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/PySide/QtCore/glue/qobject_connect.cpp b/PySide/QtCore/glue/qobject_connect.cpp index 16842a0a3..deeaa6a56 100644 --- a/PySide/QtCore/glue/qobject_connect.cpp +++ b/PySide/QtCore/glue/qobject_connect.cpp @@ -8,11 +8,10 @@ static bool getReceiver(PyObject *callback, QObject **receiver, PyObject **self) *self = PyCFunction_GET_SELF(callback); if (*self && SbkQObject_Check(*self)) *receiver = Converter<QObject*>::toCpp(*self); - } else if (!PyFunction_Check(callback)) { + } else if (PyCallable_Check(callback)) { + // Ok, just a callable object *receiver = 0; *self = 0; - qWarning() << "Invalid callback object."; - return false; } bool usingGlobalReceiver = !*receiver; |