aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/QtWidgets
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-02-08 11:18:47 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-02-14 12:11:01 +0000
commit676a89fcfc2190ffa50bcb4f011ca4a96a9dd653 (patch)
tree2521b0887b7b50641a7be7e97ca34336b26968ac /sources/pyside2/PySide2/QtWidgets
parent4566f0cba5ed5cccbec4706e343b4fd68400ff2c (diff)
Fix lost reference for item delegates
After setting an item delegate for columns and rows in classes that inherit from QAbstractItemView (like QTreeView) the reference was not kept, causing a segfault. This was solved by keeping the reference of the object. A test is provided. Task-number: PYSIDE-226 Task-number: PYSIDE-219 Change-Id: I43eeb6e85a37537311d838f5abb0ee1ab10ea713 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/QtWidgets')
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
index 60bb2433..0555d9a5 100644
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
+++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
@@ -435,6 +435,16 @@
<reference-count action="set"/>
</modify-argument>
</modify-function>
+ <modify-function signature="setItemDelegateForColumn(int, QAbstractItemDelegate*)">
+ <modify-argument index="2">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
+ <modify-function signature="setItemDelegateForRow(int, QAbstractItemDelegate*)">
+ <modify-argument index="2">
+ <reference-count action="set"/>
+ </modify-argument>
+ </modify-function>
<modify-function signature="viewOptions()const">
<modify-argument index="return">
<replace-default-expression with="QStyleOptionViewItem()" />