aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-05-23 11:51:49 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-05-24 07:33:59 +0200
commite794e7c35e6851c79479e95145c8bbf88440ea8f (patch)
treeabac70fc575b76df3b49af26ffd5b4c12cf0ab17
parent5eb9535b708b2d62b5c13defe5aaad9ee005185f (diff)
Fix a crash in QTextBlock.layout()
Prevent the return value heuristics from setting a parent relationship. Fixes: PYSIDE-1939 Change-Id: I7b8b4080f4c0c288439140c44fb9c2b896af2907 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 0e62c4db50472f8b581022c86a6be651158d0cd0)
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
index 617d64355..e1c3bca5d 100644
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
+++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
@@ -479,6 +479,11 @@
</modify-argument>
<inject-code class="target" position="end" file="../glue/qtgui.cpp" snippet="qtextblock-userdata"/>
</modify-function>
+ <modify-function signature="layout()const"> <!-- Suppress return value heuristics -->
+ <modify-argument index="return">
+ <define-ownership class="target" owner="default"/>
+ </modify-argument>
+ </modify-function>
</value-type>
<value-type name="QTextBlockFormat">
<enum-type name="LineHeightTypes" since="4.8" revision="4800"/>