diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2019-02-18 16:37:37 +0100 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2019-02-25 10:34:07 +0000 |
commit | 78b2438037504ae80eaf6b01d49df9ddb660656a (patch) | |
tree | 2ab113af877cb81e41cad5b0c74fe28aef40a446 /sources/pyside2/PySide2/QtUiTools | |
parent | fe9e90cd7fd54084438815f93616e7edaa19f7cb (diff) |
Set proper parent when overloading QUiLoader
In a couple of methods of QUiLoader, we had a parent
override leaving the methods without the proper parent.
setParent(pyArgs[0], pyResult) # Correct
setParent(self, pyResult) # Wrong override
Defining the ownership to the target class corrects this
issue and just leaves the "Correct" approach.
Fixes: PYSIDE-938
Change-Id: Id20d74756e14c58caba2ab4c65484d15da88df16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/QtUiTools')
-rw-r--r-- | sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml b/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml index 8086da01e..2cbe490aa 100644 --- a/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml +++ b/sources/pyside2/PySide2/QtUiTools/typesystem_uitools.xml @@ -90,18 +90,21 @@ <modify-function signature="createAction(QObject*,const QString&)"> <modify-argument index="return"> <parent index="1" action="add"/> + <define-ownership class="target" owner="default"/> </modify-argument> </modify-function> <modify-function signature="createActionGroup(QObject*,const QString&)"> <modify-argument index="return"> <parent index="1" action="add"/> + <define-ownership class="target" owner="default"/> </modify-argument> </modify-function> <modify-function signature="createLayout(const QString&,QObject*,const QString&)"> <modify-argument index="return"> <parent index="2" action="add"/> + <define-ownership class="target" owner="default"/> </modify-argument> </modify-function> |