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>
This commit is contained in:
parent
949f6b5255
commit
9787519352
3 changed files with 60 additions and 0 deletions
|
|
@ -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 &bm = Shiboken::BindingManager::instance();
|
||||
for (int i = 0; i < rootItem->childCount(); ++i) {
|
||||
QTreeWidgetItem *item = rootItem->child(i);
|
||||
SbkObject* wrapper = bm.retrieveWrapper(item);
|
||||
if (wrapper)
|
||||
Shiboken::Object::setParent(0, reinterpret_cast<PyObject*>(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"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue