aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2023-11-10 12:36:19 +0000
committerTopi Reinio <topi.reinio@qt.io>2023-11-27 19:18:42 +0000
commit3c17957177fa7cbe2e493787f9cc941f5bae2d9f (patch)
treee6e6d87a79cc5490358252c1317e8e7174f236a9 /src/qml/doc
parent7290d66e31c36a8ccbb3c630931367c01d34ffbe (diff)
Doc: Fix \fn template arguments for Qt Qml
Upcoming changes to QDoc require accurate definition for template arguments in \fn commands. Qualify links to qmlRegisterType() with QQmlEngine scope; this is a workaround for a problem in QDoc that will be addressed separately. Task-number: QTBUG-118080 Change-Id: I78dbbc2770e9d2fe9a7c20a5858c412fb1ae0fd8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc14
-rw-r--r--src/qml/doc/src/qtqml-writing-a-module.qdoc4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index d2df31355c..66bdff59f3 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -715,7 +715,7 @@
/*!
- \fn int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+ \fn template <typename T> int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
\relates QQmlEngine
This template function registers the C++ type in the QML system with
@@ -768,7 +768,7 @@
*/
/*!
- \fn int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor)
+ \fn template<typename T, int metaObjectRevision> int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor)
\relates QQmlEngine
This template function registers the specified revision of a C++ type in the QML system with
@@ -787,7 +787,7 @@
*/
/*!
- \fn int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message)
+ \fn template <typename T> int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message)
\relates QQmlEngine
This template function registers the C++ type in the QML system with
@@ -806,7 +806,7 @@
*/
/*!
- \fn int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
+ \fn template <typename T, typename E> int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
\relates QQmlEngine
This template function registers the C++ type and its extension object in the
@@ -821,7 +821,7 @@
/*!
- \fn int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason)
+ \fn template <typename T, typename E> int qmlRegisterExtendedUncreatableType(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& reason)
\relates QQmlEngine
This template function registers the C++ type and its extension
@@ -936,7 +936,7 @@
*/
/*!
- \fn int qmlRegisterAnonymousType(const char *uri, int versionMajor)
+ \fn template <typename T> int qmlRegisterAnonymousType(const char *uri, int versionMajor)
\relates QQmlEngine
This template function registers the C++ type in the QML system as an anonymous type. The
@@ -1145,7 +1145,7 @@
*/
/*!
- \fn int qmlRegisterSingletonType(const char *uri, int versionMajor, int versionMinor, const char *typeName, std::function<QObject*(QQmlEngine *, QJSEngine *)> callback)
+ \fn template <typename T> int qmlRegisterSingletonType(const char *uri, int versionMajor, int versionMinor, const char *typeName, std::function<QObject*(QQmlEngine *, QJSEngine *)> callback)
\relates QQmlEngine
This function may be used to register a singleton type provider \a callback in a particular \a uri
diff --git a/src/qml/doc/src/qtqml-writing-a-module.qdoc b/src/qml/doc/src/qtqml-writing-a-module.qdoc
index f722f6d0be..0f75d492e8 100644
--- a/src/qml/doc/src/qtqml-writing-a-module.qdoc
+++ b/src/qml/doc/src/qtqml-writing-a-module.qdoc
@@ -290,8 +290,8 @@ and \l{QMetaProperty::revision}. This means all the types in your type hierarchy
to follow the same versioning scheme. This includes any types provided by Qt itself
that you inherit from.
-With \l{qmlRegisterType} and related functions you can register any mapping between
-metaobject revisions and type versions. You then need to use the one-argument forms
+With \l{QQmlEngine::}{qmlRegisterType} and related functions you can register any mapping
+between metaobject revisions and type versions. You then need to use the one-argument forms
of \l{Q_REVISION} and the \c{REVISION} attribute of \l{Q_PROPERTY}. However, this
can become rather complex and confusing and is not recommended.