aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-07-14 14:15:02 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-09-24 13:52:35 +0200
commitbce1bfb3af99aeb24259df34d662e8fcf072d3fd (patch)
treeef36333a2b059f4278cc5aad4efa860f9e4cd30b /sources/pyside6
parent79b32f4d4b5154ba8001bafc481fb6edacc10280 (diff)
shiboken6: Add opaque containers for C++ sequence containers
Add a class that directly wraps a C++ sequence container, allow for modifying them. For all instantiated containers, generate a special (sequence) type that wraps the C++ container directly. For example, it will be accessible as a QList_int. This is achieved via providing a template for a type private that relies on a conversion traits template for conversion. Only the conversion traits specialization code needs to be generated. Use cases: - Allowing for modifying Fields of such container types (non-owning) - Pass it into functions taking such containers instead of converting back and forth from a PyList (constructed in Python, owning) [ChangeLog][shiboken6] Support for opaque C++ sequence scontainers has been added, allowing to pass a wrapped C++ container directly instead of converting it back and forth from Python sequences. Task-number: PYSIDE-1605 Change-Id: I49d378eb1a0151730d817d5bdd4b71a7c3b5cdda Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index fad2ee16c..30d5f3d7b 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -405,7 +405,8 @@
</container-type>
<!-- FIXME: Which one is it going to be? -->
- <container-type name="QList" type="list">
+ <container-type name="QList" type="list"
+ opaque-containers="int:QIntList;QPoint:QPointList;QPointF:QPointFList">
<include file-name="QList" location="global"/>
<declare-function signature="append(T)" return-type="void"/>
<declare-function signature="insert(qsizetype,T)" return-type="void"/>