Fix bug#316 - "QAbstractItemModel.createIndex is broken"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
This commit is contained in:
parent
e0a5ca517f
commit
5c0d39b9dc
4 changed files with 26 additions and 4 deletions
|
|
@ -2,11 +2,11 @@ static bool getReceiver(PyObject *callback, QObject **receiver, PyObject **self)
|
|||
{
|
||||
if (PyMethod_Check(callback)) {
|
||||
*self = PyMethod_GET_SELF(callback);
|
||||
if (SbkQObject_Check(*self))
|
||||
if (Shiboken::Converter<QObject*>::checkType(*self))
|
||||
*receiver = Converter<QObject*>::toCpp(*self);
|
||||
} else if (PyCFunction_Check(callback)) {
|
||||
*self = PyCFunction_GET_SELF(callback);
|
||||
if (*self && SbkQObject_Check(*self))
|
||||
if (*self && Shiboken::Converter<QObject*>::checkType(*self))
|
||||
*receiver = Converter<QObject*>::toCpp(*self);
|
||||
} else if (PyCallable_Check(callback)) {
|
||||
// Ok, just a callable object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue