aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-12-09 15:49:07 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-12-10 07:53:20 +0100
commitfd575256dacbc96074a7793385da7a3b404aafda (patch)
tree6eb422a6896ac6e7c2c72de12c0795b7ae3c7bf8 /examples
parent15a5cea299c01669095aba071afca0521107b487 (diff)
samplebinding example: Remove primitive type definitions
Those types are now built-in. Task-number: PYSIDE-1660 Change-Id: Id09a44ae5d216db8abee034a6b136c3c8bab3b2d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/samplebinding/bindings.xml5
-rw-r--r--examples/samplebinding/doc/samplebinding.rst11
2 files changed, 5 insertions, 11 deletions
diff --git a/examples/samplebinding/bindings.xml b/examples/samplebinding/bindings.xml
index 9be9f1afa..3f44dbd1b 100644
--- a/examples/samplebinding/bindings.xml
+++ b/examples/samplebinding/bindings.xml
@@ -2,7 +2,7 @@
<!--
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt for Python examples of the Qt Toolkit.
@@ -52,9 +52,6 @@
-->
<typesystem package="Universe">
- <primitive-type name="bool"/>
- <primitive-type name="std::string"/>
-
<object-type name="Icecream">
<!-- By default the ownership of an object created in Python is tied
to the Python name pointing to it. In order for the underlying
diff --git a/examples/samplebinding/doc/samplebinding.rst b/examples/samplebinding/doc/samplebinding.rst
index 417bae9b8..8d74be281 100644
--- a/examples/samplebinding/doc/samplebinding.rst
+++ b/examples/samplebinding/doc/samplebinding.rst
@@ -54,8 +54,6 @@ done by specifying a special XML file called a typesystem file.
In the typesystem file you specify things like:
- * which C++ primitive types should have bindings (int, bool, float)
-
* which C++ classes should have bindings (Icecream) and what kind of
semantics (value / object)
@@ -66,11 +64,10 @@ In the typesystem file you specify things like:
* Package name (name of package as imported from Python)
-In this example we declare ``bool`` and ``std::string`` as primitive types,
-``Icecream`` as an object type, ``Truck`` as a value type,
-and the ``clone()`` and ``addIcecreamFlavor(Icecream*)`` need additional
-info about who owns the parameter objects when passing them across
-language boundaries (in this case C++ will delete the objects).
+In this example we declare ``Icecream`` as an object type and ``Truck``
+as a value type. The ``clone()`` and ``addIcecreamFlavor(Icecream*)``
+need additional info about who owns the parameter objects when passing
+them across language boundaries (in this case C++ will delete the objects).
The ``Truck`` has getters and setters for the string ``arrivalMessage``.
In the type system file, we declare this to be a property in Python: