Fixed signal name parser.
Fixes bug #820. Reviewer: Lauro Moura <lauro.neto@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
parent
18924d8ce0
commit
f65c15ec95
1 changed files with 1 additions and 1 deletions
|
|
@ -731,7 +731,7 @@ QString getCallbackSignature(const char* signal, QObject* receiver, PyObject* ca
|
||||||
if (isMethod || isFunction) {
|
if (isMethod || isFunction) {
|
||||||
PyObject* function = isMethod ? PyMethod_GET_FUNCTION(callback) : callback;
|
PyObject* function = isMethod ? PyMethod_GET_FUNCTION(callback) : callback;
|
||||||
PyCodeObject* objCode = reinterpret_cast<PyCodeObject*>(PyFunction_GET_CODE(function));
|
PyCodeObject* objCode = reinterpret_cast<PyCodeObject*>(PyFunction_GET_CODE(function));
|
||||||
functionName = PyString_AS_STRING(objCode->co_name);
|
functionName = PyString_AS_STRING(reinterpret_cast<PyFunctionObject*>(function)->func_name);
|
||||||
useSelf = isMethod;
|
useSelf = isMethod;
|
||||||
numArgs = objCode->co_flags & CO_VARARGS ? -1 : objCode->co_argcount;
|
numArgs = objCode->co_flags & CO_VARARGS ? -1 : objCode->co_argcount;
|
||||||
} else if (PyCFunction_Check(callback)) {
|
} else if (PyCFunction_Check(callback)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue