aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@qt.io>2020-08-26 23:08:23 +0200
committerFawzi Mohamed <fawzi.mohamed@qt.io>2020-08-27 12:53:41 +0200
commit5348518daace1db1eb75273196a8fa3703e78004 (patch)
tree9183077e2b6c433dfe17f2ce68940efae8dcb953 /src/qml/doc/src
parent96098a358fea99c831527b8dbe360817e6376df1 (diff)
Document QML_FOREIGN_NAMESPACE() macro
Change-Id: I5793df82849f06e2d870335c3c17902e452399a4 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qml/doc/src')
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index ebab3f94ff..c0c481b861 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -251,8 +251,27 @@
This is useful for registering types that cannot be amended to add the macros,
for example because they belong to 3rdparty libraries.
+ To register a namespace, see \l QML_FOREIGN_NAMESPACE().
- \sa QML_ELEMENT, QML_NAMED_ELEMENT()
+ \sa QML_ELEMENT, QML_NAMED_ELEMENT(), QML_FOREIGN_NAMESPACE()
+*/
+
+/*!
+ \macro QML_FOREIGN_NAMESPACE(FOREIGN_NAMESPACE)
+ \relates QQmlEngine
+
+ Declares that any \l QML_ELEMENT, \l QML_NAMED_ELEMENT(), \l QML_ANONYMOUS,
+ \l QML_INTERFACE, \l QML_UNCREATABLE(), \l QML_SINGLETON,
+ \l QML_ADDED_IN_MINOR_VERSION(), or \l QML_REMOVED_IN_MINOR_VERSION()
+ macros in the enclosing C++ namespace do not apply to the enclosing type but
+ instead to \a FOREIGN_NAMESPACE. The enclosing namespace still needs to be
+ registered with the \l {The Meta-Object System}{meta object system} using a
+ \l Q_NAMESPACE macro.
+
+ This is useful for registering namespaces that cannot be amended to add the macros,
+ for example because they belong to 3rdparty libraries.
+
+ \sa QML_ELEMENT, QML_NAMED_ELEMENT(), QML_FOREIGN()
*/
/*!