aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2022-03-23 22:51:09 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-10 12:48:55 +0000
commitf5aa625e71569fd5ed155ad1db5467d39e4d01f9 (patch)
tree2779224c9c24f42b9c214b70ff9fcd7174e5167d
parent63d0623f5c71c436d1bdda373673b4c30fde0c5e (diff)
Doc: Add \relates command to documented global functions
qmlRegisterModuleImport() and qmlUnregisterModuleImport() are public, documented global functions but not related to anything. Associate them with QQmlEngine make them appear as related non-members. Same for the related QQmlModuleImportSpecialVersions enum. Drop the QDoc comment tag (/*!) for an internal function. Task-number: QTBUG-99578 Change-Id: I3fa81ff12a2c19e6ed09da6a8398e8d1df141b32 Reviewed-by: Luca Di Sera <luca.disera@qt.io> (cherry picked from commit 281c5bf81504165349c156774fdf3bd5264e3ee0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qml/qml/qqml.cpp21
-rw-r--r--src/qml/qmldirparser/qqmlimportresolver.cpp2
2 files changed, 13 insertions, 10 deletions
diff --git a/src/qml/qml/qqml.cpp b/src/qml/qml/qqml.cpp
index 66cfc5aa87..72a287c318 100644
--- a/src/qml/qml/qqml.cpp
+++ b/src/qml/qml/qqml.cpp
@@ -211,6 +211,7 @@ static QTypeRevision resolveModuleVersion(int moduleMajor)
/*!
* \enum QQmlModuleImportSpecialVersions
+ * \relates QQmlEngine
*
* Defines some special values that can be passed to the version arguments of
* qmlRegisterModuleImport() and qmlUnregisterModuleImport().
@@ -229,25 +230,26 @@ static QTypeRevision resolveModuleVersion(int moduleMajor)
*/
/*!
- * Registers an implicit import for module \a uri of major version \a majorVersion.
+ * \relates QQmlEngine
+ * Registers an implicit import for module \a uri of major version \a moduleMajor.
*
* This has the same effect as an \c import statement in a qmldir file: Whenever
* \a uri of version \a moduleMajor is imported, \a import of version
* \a importMajor. \a importMinor is automatically imported, too. If
- * \a importMajor is \l QmlModuleImportLatest the latest version
+ * \a importMajor is \l QQmlModuleImportLatest the latest version
* available of that module is imported, and \a importMinor does not matter. If
- * \a importMinor is \l QmlModuleImportLatest the latest minor version of a
- * \a importMajor is chosen. If \a importMajor is \l QmlModuleImportAuto the
+ * \a importMinor is \l QQmlModuleImportLatest the latest minor version of a
+ * \a importMajor is chosen. If \a importMajor is \l QQmlModuleImportAuto the
* version of \a import is version of \a uri being imported, and \a importMinor
- * does not matter. If \a moduleMajor is \a QmlModuleImportModuleAny the module
+ * does not matter. If \a moduleMajor is \l QQmlModuleImportModuleAny the module
* import is applied for any major version of \a uri. For example, you may
* specify that whenever any version of MyModule is imported, the latest version
* of MyOtherModule should be imported. Then, the following call would be
* appropriate:
*
* \code
- * qmlRegisterModuleImport("MyModule", QmlModuleImportModuleAny,
- * "MyOtherModule", QmlModuleImportLatest);
+ * qmlRegisterModuleImport("MyModule", QQmlModuleImportModuleAny,
+ * "MyOtherModule", QQmlModuleImportLatest);
* \endcode
*
* Or, you may specify that whenever major version 5 of "MyModule" is imported,
@@ -261,8 +263,8 @@ static QTypeRevision resolveModuleVersion(int moduleMajor)
* imported whenever "MyModule" is imported, specify the following:
*
* \code
- * qmlRegisterModuleImport("MyModule", QmlModuleImportModuleAny,
- * "MyOtherModule", QmlModuleImportAuto);
+ * qmlRegisterModuleImport("MyModule", QQmlModuleImportModuleAny,
+ * "MyOtherModule", QQmlModuleImportAuto);
* \endcode
*
* \sa qmlUnregisterModuleImport()
@@ -277,6 +279,7 @@ void qmlRegisterModuleImport(const char *uri, int moduleMajor,
/*!
+ * \relates QQmlEngine
* Removes a module import previously registered with qmlRegisterModuleImport()
*
* Calling this function makes sure that \a import of version
diff --git a/src/qml/qmldirparser/qqmlimportresolver.cpp b/src/qml/qmldirparser/qqmlimportresolver.cpp
index 95073df4e7..b4f4dbf7a1 100644
--- a/src/qml/qmldirparser/qqmlimportresolver.cpp
+++ b/src/qml/qmldirparser/qqmlimportresolver.cpp
@@ -7,7 +7,7 @@ QT_BEGIN_NAMESPACE
enum ImportVersion { FullyVersioned, PartiallyVersioned, Unversioned };
-/*!
+/*
Forms complete paths to a module, from a list of base paths,
a module URI and version specification.