aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-06-18 07:41:09 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-18 10:12:43 +0000
commitd5b12f64897ccff4716431a2e351f2c3b8ced63c (patch)
tree3c3ce6f04b83edd4164fb2578ebf3a0f4488e3c0
parent654694a90b76759c4846ac638a28f4379fb1e4fa (diff)
shiboken6: Update documentation on global functions
It is actually possible to modify a global function with modify-function, update the documentation accordingly and link the nodes. Change-Id: I2fd313851712cd96c67fcd90d68664f57dc0902a Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 7e8d8d1a9adb4f75b878f4b5267b59c5a81170df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/doc/typesystem_manipulating_objects.rst6
-rw-r--r--sources/shiboken6/doc/typesystem_specifying_types.rst17
2 files changed, 13 insertions, 10 deletions
diff --git a/sources/shiboken6/doc/typesystem_manipulating_objects.rst b/sources/shiboken6/doc/typesystem_manipulating_objects.rst
index 40b61f52d..c8c3b808c 100644
--- a/sources/shiboken6/doc/typesystem_manipulating_objects.rst
+++ b/sources/shiboken6/doc/typesystem_manipulating_objects.rst
@@ -142,7 +142,7 @@ modify-function
^^^^^^^^^^^^^^^
The ``modify-function`` node allows you to modify a given C++ function when
- mapping it onto the target language, and it is a child of a
+ mapping it onto the target language, and it is a child of a :ref:`function`,
:ref:`namespace`, :ref:`object-type` or a :ref:`value-type` node.
Use the :ref:`modify-argument` node to specify which argument the
modification affects.
@@ -162,7 +162,9 @@ modify-function
</object-type>
The ``signature`` attribute is a normalized C++ signature, excluding return
- values but including potential const declarations.
+ values but including potential const declarations. It is not required
+ when ``modify-function`` appears as a child of a :ref:`function` node to
+ modify a global function.
The ``since`` attribute specify the API version when this function was modified.
diff --git a/sources/shiboken6/doc/typesystem_specifying_types.rst b/sources/shiboken6/doc/typesystem_specifying_types.rst
index 1172b3f15..5756b70e8 100644
--- a/sources/shiboken6/doc/typesystem_specifying_types.rst
+++ b/sources/shiboken6/doc/typesystem_specifying_types.rst
@@ -539,9 +539,9 @@ smart-pointer-type
function
^^^^^^^^
- The ``function`` node indicates that the given C++ global function is mapped onto
- the target language.
- It is a child of the :ref:`typesystem` node.
+ The ``function`` node indicates that the given C++ global function is mapped
+ onto the target language. It is a child of the :ref:`typesystem` node
+ and may contain a :ref:`modify-function` child node.
.. code-block:: xml
@@ -549,12 +549,13 @@ function
<function signature="..." rename="..." since="..." snake-case="yes | no | both" />
</typesystem>
- This tag has some limitations, it doesn't support function modifications, besides you
- can't add a function overload using :ref:`add-function` tag to an existent function.
- These limitation will be addressed in future versions of ApiExtractor.
+ There is a limitation; you cannot add a function overload using
+ the :ref:`add-function` tag to an existent function.
+
+ The *optional* **since** attribute is used to specify the API version in which
+ the function was introduced.
- The function tag has two *optional* attributes: **since**, whose value is used to specify
- the API version of this function, and **rename**, to modify the function name.
+ The *optional* **rename** attribute is used to modify the function name.
The *optional* **snake-case** attribute allows for overriding the value
specified on the **typesystem** element.