aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml4
-rw-r--r--sources/pyside2/PySide2/typesystem_templates.xml19
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&lt;QFontDialog::FontDialogOption&gt;)">
@@ -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(&amp;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(&amp;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);