diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-11 14:26:09 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-13 07:25:06 +0000 |
commit | 7b2025f542729b0c407519d2cb45688dd402eed7 (patch) | |
tree | 65b2c76142d13bdd30087450f985b39a5b04aee8 /sources/pyside2/PySide2 | |
parent | 2bf3dcc98e6df1b434b0fb26b981302423c7ef87 (diff) |
shiboken: Refactor Generator::minimalConstructor(AbstractMetaClass)
Add some convenience functions returning the status of
default expressions to AbstractMetaArgument.
Rewrite the function to only insert suitable candidates into
an ordered multimap instead of looping twice over all candidates.
This unearthed a bug in the old algorithm trying to find the maximum
number of arguments: When no candidates were found, maxArgs was left
at 0, which caused it to assume default constructible. This triggered
for the QMatrixNxN classes inheriting QGenericMatrix<int, int, Type>
with (unsupported) non-type template parameters. For these, the
default constructor needs to be specified now.
Task-number: PYSIDE-62
Change-Id: I5ce2bed43001780553048d8af0addaba2b22410b
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/pyside2/PySide2')
-rw-r--r-- | sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml index 665750946..24ee2985f 100644 --- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml +++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml @@ -2380,7 +2380,10 @@ </modify-function> </object-type> - <value-type name="QMatrix2x2" since="4.6"> + <!-- The matrix classes need a default constructor specification since + they inherit template class QGenericMatrix<int, int, Type> with (unsupported) + non-type template parameters --> + <value-type name="QMatrix2x2" since="4.6" default-constructor="QMatrix2x2()"> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> <insert-template name="repr_code_matrix"> @@ -2468,7 +2471,7 @@ <add-function signature="operator==(const QMatrix2x2&)" return-type="bool" /> </value-type> - <value-type name="QMatrix2x3" since="4.6"> + <value-type name="QMatrix2x3" since="4.6" default-constructor="QMatrix2x3()"> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> <insert-template name="repr_code_matrix"> @@ -2538,7 +2541,7 @@ <add-function signature="operator==(const QMatrix2x3&)" return-type="bool" /> </value-type> - <value-type name="QMatrix2x4" since="4.6"> + <value-type name="QMatrix2x4" since="4.6" default-constructor="QMatrix2x4()"> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> <insert-template name="repr_code_matrix"> @@ -2608,7 +2611,7 @@ <add-function signature="operator==(const QMatrix2x4&)" return-type="bool" /> </value-type> - <value-type name="QMatrix3x2" since="4.6"> + <value-type name="QMatrix3x2" since="4.6" default-constructor="QMatrix3x2()"> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> <insert-template name="repr_code_matrix"> @@ -2678,7 +2681,7 @@ <add-function signature="operator==(const QMatrix3x2&)" return-type="bool" /> </value-type> - <value-type name="QMatrix3x3" since="4.6"> + <value-type name="QMatrix3x3" since="4.6" default-constructor="QMatrix3x3()"> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> <insert-template name="repr_code_matrix"> @@ -2748,7 +2751,7 @@ <add-function signature="operator==(const QMatrix3x3&)" return-type="bool" /> </value-type> - <value-type name="QMatrix3x4" since="4.6"> + <value-type name="QMatrix3x4" since="4.6" default-constructor="QMatrix3x4()"> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> <insert-template name="repr_code_matrix"> @@ -2818,7 +2821,7 @@ <add-function signature="operator==(const QMatrix3x4&)" return-type="bool" /> </value-type> - <value-type name="QMatrix4x2" since="4.6"> + <value-type name="QMatrix4x2" since="4.6" default-constructor="QMatrix4x2()"> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> <insert-template name="repr_code_matrix"> @@ -2888,7 +2891,7 @@ <add-function signature="operator==(const QMatrix4x2&)" return-type="bool" /> </value-type> - <value-type name="QMatrix4x3" since="4.6"> + <value-type name="QMatrix4x3" since="4.6" default-constructor="QMatrix4x3()"> <add-function signature="__repr__" return-type="PyObject*"> <inject-code class="target" position="beginning"> <insert-template name="repr_code_matrix"> @@ -2958,7 +2961,7 @@ <add-function signature="operator==(const QMatrix4x3&)" return-type="bool" /> </value-type> - <value-type name="QMatrix4x4" since="4.6"> + <value-type name="QMatrix4x4" since="4.6" default-constructor="QMatrix4x4()"> <!-- Qt5: HAIRY TRICK ALERT ahead! |