aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-02-04 15:11:19 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-03-01 07:46:27 +0000
commit5abbce3485e91bdbac532d4c811b9696f8e88cfc (patch)
tree7b25d5d314ef5baebaacfdd5937928531a3a53a0 /sources/shiboken2/tests/samplebinding/typesystem_sample.xml
parent099f3f46ca9ec1362f211278df4b3e4949b0a339 (diff)
shiboken: Handle <array> modifications in template inheritance
Array modifications did not work in template specializations (like typedef QGenericMatrix<2,2,int> QMatrix2x2> causing warnings like: There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive type 'const float *' of argument 1 in function 'QMatrix2x2::QMatrix2x2(const float * values)'. Rewrite the array modification code to operate on AbstractMetaType only instead of requiring code model data types and add the missing handling to AbstractMetaBuilderPrivate::inheritTemplate(). Add a test. Note that the warning was fixed by another change removing the array modification since it did not take effect due to the presence of a manually added PySequence constructor. Change-Id: Ie4a1092fbef7237f8858790a74e2f75070ef6586 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/tests/samplebinding/typesystem_sample.xml')
-rw-r--r--sources/shiboken2/tests/samplebinding/typesystem_sample.xml13
1 files changed, 11 insertions, 2 deletions
diff --git a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
index 9b967fc5..78ceaab4 100644
--- a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
+++ b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml
@@ -521,8 +521,17 @@
</value-type>
<value-type name="IntArray" generate="no"/>
- <value-type name="IntArray2"/>
- <value-type name="IntArray3"/>
+ <value-type name="IntArray2">
+ <modify-function signature="IntArray2(const int*)">
+ <modify-argument index="1"><array/></modify-argument>
+ </modify-function>
+ </value-type>
+
+ <value-type name="IntArray3">
+ <modify-function signature="IntArray3(const int*)">
+ <modify-argument index="1"><array/></modify-argument>
+ </modify-function>
+ </value-type>
<enum-type name="OverloadedFuncEnum"/>
<!-- BUG: