Create unit-test for signal with QObject.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
4cca85f525
commit
83cf37f609
3 changed files with 26 additions and 8 deletions
|
|
@ -246,7 +246,12 @@ char* signal_get_type_name(PyObject* type)
|
|||
if (PyType_Check(type)) {
|
||||
//tp_name return the full name
|
||||
Shiboken::AutoDecRef typeName(PyObject_GetAttrString(type, "__name__"));
|
||||
return strdup(PyString_AS_STRING(typeName.object()));
|
||||
char *aux = strdup(PyString_AS_STRING(typeName.object()));
|
||||
if (Shiboken::TypeResolver::getType(aux) == Shiboken::TypeResolver::ObjectType) {
|
||||
aux = reinterpret_cast<char*>(realloc(aux, strlen(aux) + 1));
|
||||
aux = strcat(aux, "*");
|
||||
}
|
||||
return aux;
|
||||
} else if (PyString_Check(type)) {
|
||||
return strdup(PyString_AS_STRING(type));
|
||||
}
|
||||
|
|
@ -281,7 +286,6 @@ char* signal_parse_signature(PyObject *args)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return signature;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue