aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/typesystem_templates.xml
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-06-14 14:59:26 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-06-14 15:15:47 -0300
commit569d1ab60e9b2227b2f4ed407718d17cc179d265 (patch)
treefa1e9a335c6c0b0101462a11a42659800ea08a4d /PySide/typesystem_templates.xml
parent4284ae6cc69f6281140d960cfd6d62a94066bf36 (diff)
Fixed parent function return ownership.
Fixed QMainWindow functions ownership. Fixes #241. Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r--PySide/typesystem_templates.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 3badcf273..46911fac7 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -1,5 +1,14 @@
<?xml version="1.0"?>
<typesystem>
+ <template name="replace_child">
+ $CHILD_TYPE* oldChild = %CPPSELF.$FUNCTION_GET_OLD();
+ if (oldChild) {
+ Shiboken::AutoDecRef pyChild(%CONVERTTOPYTHON[$CHILD_TYPE*](oldChild));
+ Shiboken::setParent(NULL, pyChild);
+ }
+ Shiboken::setParent(%PYSELF, $PYARG);
+ </template>
+
<!-- Templates to fix bool* parameters -->
<template name="fix_bool*">
bool ok_;