From 5348518daace1db1eb75273196a8fa3703e78004 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Wed, 26 Aug 2020 23:08:23 +0200 Subject: Document QML_FOREIGN_NAMESPACE() macro Change-Id: I5793df82849f06e2d870335c3c17902e452399a4 Reviewed-by: Paul Wicking --- src/qml/doc/src/qmlfunctions.qdoc | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/qml/doc/src/qmlfunctions.qdoc') 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() */ /*! -- cgit v1.2.3