diff options
author | Luca Di Sera <luca.disera@qt.io> | 2023-11-10 13:01:01 +0100 |
---|---|---|
committer | Luca Di Sera <luca.disera@qt.io> | 2023-11-18 13:02:19 +0100 |
commit | 83233bc130b8891197982cb9e2068b7868d70ed4 (patch) | |
tree | 316e5bb3257fc30e95966e77bb20706b3e40dd28 /src/corelib/kernel | |
parent | 41c95615fc6f58d584f5658d062e35fda17dc3f8 (diff) |
Doc: Fix template information for QMetaType members
When QDoc parses a project, it parses the source code to extract the
user-provided documentation and perform sanity checkings based on the
code itself on it.
When QDoc parses an "\fn" command as part of this process, it tries to
understand, based on its intermediate representation built on the
information extracted from the code-base, which "documentable element"
the "\fn" refers to.
When QDoc performs this "matching" process, it takes into consideration
only a certain amount of information.
For example, no checking is performed over the template declaration of a
callable.
Due to some upcoming documentation, where two callables are
indistinguishable to the current process, as they differ only in their
template declaration, QDoc will start to take into consideration the
template declaration of a callable when matching.
This implies that an "\fn" command should now provide information
parity, with regards to template declaration for callables, with the
code-base so that QDoc can perform the match correctly.
The documentation for some of the members of `QMetaType` is not in sync
with the intended target template declaration.
Hence, add the missing information to the relevant "\fn" commands.
Task-number: QTBUG-118080
Change-Id: I642bbc1ab90e3cc0d32a11592ab5ad93bd181364
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 5f42bc00cb..fdec1a1a61 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -1703,7 +1703,7 @@ using QMetaTypeMutableViewRegistry Q_GLOBAL_STATIC(QMetaTypeMutableViewRegistry, customTypesMutableViewRegistry) /*! - \fn bool QMetaType::registerConverter() + \fn template<typename From, typename To> bool QMetaType::registerConverter() \since 5.2 Registers the possibility of an implicit conversion from type From to type To in the meta type system. Returns \c true if the registration succeeded, otherwise false. @@ -1856,7 +1856,7 @@ bool QMetaType::debugStream(QDebug& dbg, const void *rhs) */ /*! - \fn bool QMetaType::hasRegisteredDebugStreamOperator() + \fn template<typename T> bool QMetaType::hasRegisteredDebugStreamOperator() \deprecated \since 5.2 @@ -2620,7 +2620,7 @@ bool QMetaType::canConvert(QMetaType fromType, QMetaType toType) */ /*! - \fn bool QMetaType::hasRegisteredConverterFunction() + \fn template<typename From, typename To> bool QMetaType::hasRegisteredConverterFunction() Returns \c true, if the meta type system has a registered conversion from type From to type To. \since 5.2 \overload @@ -2637,7 +2637,7 @@ bool QMetaType::hasRegisteredConverterFunction(QMetaType fromType, QMetaType toT } /*! - \fn bool QMetaType::hasRegisteredMutableViewFunction() + \fn template<typename From, typename To> bool QMetaType::hasRegisteredMutableViewFunction() Returns \c true, if the meta type system has a registered mutable view on type From of type To. \since 6.0 \overload @@ -3065,7 +3065,7 @@ QMetaType QMetaType::fromName(QByteArrayView typeName) */ /*! - \fn int qRegisterMetaType(const char *typeName) + \fn template <typename T> int qRegisterMetaType(const char *typeName) \relates QMetaType \obsolete \threadsafe @@ -3099,7 +3099,7 @@ QMetaType QMetaType::fromName(QByteArrayView typeName) */ /*! - \fn int qRegisterMetaType() + \fn template <typename T> int qRegisterMetaType() \relates QMetaType \threadsafe \since 4.2 @@ -3155,7 +3155,7 @@ QMetaType QMetaType::fromName(QByteArrayView typeName) */ /*! - \fn int qMetaTypeId() + \fn template <typename T> int qMetaTypeId() \relates QMetaType \threadsafe \since 4.1 |