aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-06 13:32:55 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:51:44 -0300
commit5985c015b2b7efe3dad01e37b869a765dd1b8588 (patch)
tree9f26af3f442a39cf9841c8ef1d9976dee40aa970
parentadb9268807aca51c9332e266d6649005c5e9577f (diff)
Fixed QTreeWidgetItem.parent function policy.
Fixes bug #585 Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml19
1 files changed, 17 insertions, 2 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 9c8b06b1a..676829e42 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -3232,13 +3232,28 @@
</modify-argument>
</modify-function>
<modify-function signature="parent() const">
- <modify-argument index="this">
- <parent index="return" action="add"/>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
</modify-argument>
+ <inject-code class="target" position="end">
+ // Only call the parent function if this return some value
+ // the parent can be the TreeWidget
+ if (%0)
+ Shiboken::Object::setParent(%PYARG_0, %PYSELF);
+ </inject-code>
+ </modify-function>
+ <modify-function signature="treeWidget() const">
<modify-argument index="return">
<define-ownership class="target" owner="default"/>
</modify-argument>
+ <inject-code class="target" position="end">
+ // Only call the parent function if this return some value
+ // the parent can be the TreeWidgetItem
+ if (%0)
+ Shiboken::Object::setParent(%PYARG_0, %PYSELF);
+ </inject-code>
</modify-function>
+
<modify-function signature="backgroundColor(int)const" remove="all"/>
<!--### Obsolete in 4.3-->
<modify-function signature="setBackgroundColor(int, QColor)" remove="all"/>