summaryrefslogtreecommitdiffstats
path: root/PySide/QtGui/typesystem_gui_common.xml
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-27 18:59:32 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2010-12-27 19:20:05 -0300
commita74d92adcecb3df3bbb712e67590052279c5fd06 (patch)
tree0fe4bd66065b6946743880abad26670e75bdf05e /PySide/QtGui/typesystem_gui_common.xml
parent656be4ec981d793205e4818b1352a2b3896d9196 (diff)
downloadpyside-a74d92adcecb3df3bbb712e67590052279c5fd06.tar.gz
pyside-a74d92adcecb3df3bbb712e67590052279c5fd06.tar.xz
pyside-a74d92adcecb3df3bbb712e67590052279c5fd06.zip
Fix QTreeWidget parent rules.
QTreeWidget.clear() - remove all child ref from the current widget QTreeWidgetItem.parent() - use default policy for returned value Fix bug #547 Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'PySide/QtGui/typesystem_gui_common.xml')
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml20
1 files changed, 20 insertions, 0 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 0994331..c2b6343 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -3030,6 +3030,18 @@
<parent index="this" action="remove"/>
</modify-argument>
</modify-function>
+ <modify-function signature="clear()">
+ <inject-code>
+ QTreeWidgetItem *rootItem = %CPPSELF.invisibleRootItem();
+ Shiboken::BindingManager &amp;bm = Shiboken::BindingManager::instance();
+ for (int i = 0; i &lt; rootItem->childCount(); ++i) {
+ QTreeWidgetItem *item = rootItem->child(i);
+ SbkObject* wrapper = bm.retrieveWrapper(item);
+ if (wrapper)
+ Shiboken::Object::setParent(0, reinterpret_cast&lt;PyObject*&gt;(wrapper));
+ }
+ </inject-code>
+ </modify-function>
<modify-function signature="items(const QMimeData*)const" remove="all"/>
<!--### Obsolete in 4.3-->
</object-type>
@@ -3228,6 +3240,14 @@
<parent index="this" action="add"/>
</modify-argument>
</modify-function>
+ <modify-function signature="parent()">
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
<modify-function signature="backgroundColor(int)const" remove="all"/>
<!--### Obsolete in 4.3-->
<modify-function signature="setBackgroundColor(int, QColor)" remove="all"/>