aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/typesystem_templates.xml
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-09-20 15:12:23 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-09-20 15:53:12 -0300
commit0c0a5c128dcccc54ce08f53faec480d5d51f3425 (patch)
tree5eb1ac9834984ce13a37c843d4ae9dde9ee5ed64 /PySide/typesystem_templates.xml
parent80c2ebe62694815e2023b5fbafb9242fbdd1f2c9 (diff)
Fixed QApplication static functions return policy.
Fixes bug #363. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r--PySide/typesystem_templates.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index e2e6fc4a8..959fe7e20 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -181,5 +181,11 @@
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5);
%PYARG_0 = Shiboken::makeTuple(retval_, %4);
</template>
+
+ <template name="set_qapp_parent_for_orphan">
+ Shiboken::SbkBaseWrapper* _pySelf = reinterpret_cast&lt;Shiboken::SbkBaseWrapper*&gt;(%PYARG_0);
+ if (!_pySelf->parentInfo)
+ Shiboken::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0);
+ </template>
</typesystem>