Fixed problems in function that return None, and was not verified.
Some functions with inject code didnot verify the result value before convert to Shiboken types. Fixes bug #998. Reviewed by: Hugo Parente <hugo.lima@openbossa.org> Lauro Neto <lauro.neto@openbossa.org>
This commit is contained in:
parent
d29d9ad5ac
commit
bfcc30ab86
1 changed files with 6 additions and 4 deletions
|
|
@ -246,10 +246,12 @@
|
||||||
%END_ALLOW_THREADS
|
%END_ALLOW_THREADS
|
||||||
%PYARG_0 = Shiboken::makeTuple(retval_, %5);
|
%PYARG_0 = Shiboken::makeTuple(retval_, %5);
|
||||||
</template>
|
</template>
|
||||||
<template name="set_qapp_parent_for_orphan">
|
<template name="set_qapp_parent_for_orphan">
|
||||||
SbkObject* _pySelf = reinterpret_cast<SbkObject*>(%PYARG_0);
|
if (%PYARG_0 && (%PYARG_0 != Py_None)) {
|
||||||
if (!Shiboken::Object::hasParentInfo(_pySelf))
|
SbkObject* _pySelf = reinterpret_cast<SbkObject*>(%PYARG_0);
|
||||||
Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
|
if (!Shiboken::Object::hasParentInfo(_pySelf))
|
||||||
|
Shiboken::Object::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
|
||||||
|
}
|
||||||
</template>
|
</template>
|
||||||
<!-- templates for __repr__ -->
|
<!-- templates for __repr__ -->
|
||||||
<template name="repr_code">
|
<template name="repr_code">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue