diff options
author | Cristian Maureira-Fredes <cmaurei@aei.mpg.de> | 2018-07-27 02:43:21 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-08-07 12:11:34 +0000 |
commit | ea3f493e526ec4052ac51bbe531bfbc48ea624e9 (patch) | |
tree | 668e8ea2193dfa25706290e75ecb003c2886bcc1 /sources/pyside2/PySide2 | |
parent | b45d97ae4902fbae26f66e33526f868f32a503ce (diff) |
Invert return tuple order in QFont dialogs
The return order was wrong, and since it is based
in templates used by other methods, a new template
needed to be created.
Task-number: PYSIDE-755
Change-Id: I905529844063f7e913f264e68cfceb6ce7b45358
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/PySide2')
-rw-r--r-- | sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml | 4 | ||||
-rw-r--r-- | sources/pyside2/PySide2/typesystem_templates.xml | 19 |
2 files changed, 21 insertions, 2 deletions
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml index 125d63054..3f8898c1f 100644 --- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml +++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml @@ -600,7 +600,7 @@ <replace-type modified-type="PyTuple" /> </modify-argument> <inject-code class="target" position="beginning"> - <insert-template name="fix_bool*,arg"/> + <insert-template name="bool*_fix,arg"/> </inject-code> </modify-function> <modify-function signature="getFont(bool*,QFont,QWidget*,QString,QFlags<QFontDialog::FontDialogOption>)"> @@ -611,7 +611,7 @@ <replace-type modified-type="PyTuple" /> </modify-argument> <inject-code class="target" position="beginning"> - <insert-template name="fix_bool*,arg,arg,arg,arg"/> + <insert-template name="bool*_fix,arg,arg,arg,arg"/> </inject-code> </modify-function> </object-type> diff --git a/sources/pyside2/PySide2/typesystem_templates.xml b/sources/pyside2/PySide2/typesystem_templates.xml index b13ab4b63..a17337258 100644 --- a/sources/pyside2/PySide2/typesystem_templates.xml +++ b/sources/pyside2/PySide2/typesystem_templates.xml @@ -50,6 +50,25 @@ Shiboken::Object::setParent(%PYSELF, $PYARG); </template> + <template name="tuple_ok_retval"> + %PYARG_0 = PyTuple_New(2); + PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[bool](ok_)); + PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%RETURN_TYPE](retval_)); + </template> + <template name="bool*_fix,arg"> + bool ok_; + %BEGIN_ALLOW_THREADS + %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2); + %END_ALLOW_THREADS + <insert-template name="tuple_ok_retval"/> + </template> + <template name="bool*_fix,arg,arg,arg,arg"> + bool ok_; + %BEGIN_ALLOW_THREADS + %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&ok_, %2, %3, %4, %5); + %END_ALLOW_THREADS + <insert-template name="tuple_ok_retval"/> + </template> <!-- Templates to fix bool* parameters --> <template name="tuple_retval_ok"> %PYARG_0 = PyTuple_New(2); |