aboutsummaryrefslogtreecommitdiffstats
path: root/doc/typesystem_specifying_types.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/typesystem_specifying_types.rst')
-rw-r--r--doc/typesystem_specifying_types.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/typesystem_specifying_types.rst b/doc/typesystem_specifying_types.rst
index 68b85f5f..66536cf7 100644
--- a/doc/typesystem_specifying_types.rst
+++ b/doc/typesystem_specifying_types.rst
@@ -77,6 +77,7 @@ primitive-type
<primitive-type name="..."
since="..."
target-name="..."
+ default-constructor="..."
preferred-conversion="yes | no" />
</typesystem>
@@ -93,6 +94,13 @@ primitive-type
and "long long" become "long" but we should prefer the "qint64" version. For
this reason we mark "long long" with preferred-conversion="no".
+ The *optional* **preferred-conversion** attribute tells how to build a default
+ instance of the primitive type. It should be a constructor call capable of
+ creating a instance of the primitive type. Example: a class "Foo" could have
+ a **preferred-conversion** value set to "Foo()". Usually this attribute is
+ used only for classes declared as primitive types and not for primitive C++
+ types, but that depends on the application using *ApiExtractor*.
+
.. _namespace: