diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-03-06 11:59:13 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-03-14 12:31:14 +0100 |
commit | fce275e1de88b6d5bdd1c9612b910fa68d1db3f1 (patch) | |
tree | 598036bb8219988dbe07007bc5a12e7d9ff72e74 /sources/shiboken6/tests/samplebinding | |
parent | 52e3888582ac3f3db322d7113734ce43dc325099 (diff) |
shiboken6: Handle returning primitive types by pointer
This manifests in QtDataVisualization's
const QBarDataArray *QBarDataProxy::array() const
where QBarDataArray is handled as a primitive type.
This required adapting a code snippet which was relying
on the argument QString* being treated as QString.
Task-number: PYSIDE-2206
Change-Id: Ib05f01d7b54e103cf5bb71be86ffa9b5067ca3fb
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/tests/samplebinding')
-rw-r--r-- | sources/shiboken6/tests/samplebinding/primitivereferenceargument_test.py | 4 | ||||
-rw-r--r-- | sources/shiboken6/tests/samplebinding/typesystem_sample.xml | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/samplebinding/primitivereferenceargument_test.py b/sources/shiboken6/tests/samplebinding/primitivereferenceargument_test.py index 45cf534a6..790ed39d5 100644 --- a/sources/shiboken6/tests/samplebinding/primitivereferenceargument_test.py +++ b/sources/shiboken6/tests/samplebinding/primitivereferenceargument_test.py @@ -18,6 +18,10 @@ class PrimitiveReferenceArgumentTest(unittest.TestCase): '''C++ signature: int acceptIntReference(int&)''' self.assertEqual(sample.acceptIntReference(123), 123) + def testIntReturnPtr(self): + '''C++ signature: const int *acceptIntReturnPtr(int x)''' + self.assertEqual(sample.acceptIntReturnPtr(123), 123) + def testOddBoolReferenceArgument(self): '''C++ signature: OddBool acceptOddBoolReference(OddBool&)''' self.assertEqual(sample.acceptOddBoolReference(True), True) diff --git a/sources/shiboken6/tests/samplebinding/typesystem_sample.xml b/sources/shiboken6/tests/samplebinding/typesystem_sample.xml index d0f98be46..25d303a27 100644 --- a/sources/shiboken6/tests/samplebinding/typesystem_sample.xml +++ b/sources/shiboken6/tests/samplebinding/typesystem_sample.xml @@ -400,6 +400,7 @@ <function signature="returnNullValueTypePointer()" /> <function signature="returnNullObjectTypePointer()" /> <function signature="acceptInt(int)" /> + <function signature="acceptIntReturnPtr(int)"/> <function signature="acceptUInt(unsigned int)" /> <function signature="acceptLong(long)" /> <function signature="acceptULong(unsigned long)" /> |