From e795898cc4387e81ef36c848acdc97bf745d5c8d Mon Sep 17 00:00:00 2001 From: Luca Di Sera Date: Fri, 3 Nov 2023 15:28:56 +0100 Subject: [PATCH] Doc: Fix template information for QTypeRevision members MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 of the members of `QTypeRevision` 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: Id121fb926cdd1a7905be1693f8d9fb90834a99e0 Reviewed-by: Topi Reiniƶ --- src/corelib/tools/qversionnumber.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/corelib/tools/qversionnumber.cpp b/src/corelib/tools/qversionnumber.cpp index dcb2a3ad646..75dadb6837c 100644 --- a/src/corelib/tools/qversionnumber.cpp +++ b/src/corelib/tools/qversionnumber.cpp @@ -557,7 +557,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template static bool QTypeRevision::isValidSegment(Integer segment) + \fn template = true> static bool QTypeRevision::isValidSegment(Integer segment) Returns true if the given number can be used as either major or minor version in a QTypeRevision. The valid range for \a segment is \c {>= 0} and \c {< 255}. @@ -572,7 +572,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template static QTypeRevision QTypeRevision::fromVersion(Major majorVersion, Minor minorVersion) + \fn template = true, if_valid_segment_type = true> static QTypeRevision QTypeRevision::fromVersion(Major majorVersion, Minor minorVersion) Produces a QTypeRevision from the given \a majorVersion and \a minorVersion, both of which need to be a valid segments. @@ -581,7 +581,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template static QTypeRevision QTypeRevision::fromMajorVersion(Major majorVersion) + \fn template = true> static QTypeRevision QTypeRevision::fromMajorVersion(Major majorVersion) Produces a QTypeRevision from the given \a majorVersion with an invalid minor version. \a majorVersion needs to be a valid segment. @@ -590,7 +590,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template static QTypeRevision QTypeRevision::fromMinorVersion(Minor minorVersion) + \fn template = true> static QTypeRevision QTypeRevision::fromMinorVersion(Minor minorVersion) Produces a QTypeRevision from the given \a minorVersion with an invalid major version. \a minorVersion needs to be a valid segment. @@ -599,7 +599,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template static QTypeRevision QTypeRevision::fromEncodedVersion(Integer value) + \fn template = true> static QTypeRevision QTypeRevision::fromEncodedVersion(Integer value) Produces a QTypeRevision from the given \a value. \a value encodes both the minor and major versions in the least significant and second least @@ -660,7 +660,7 @@ size_t qHash(const QVersionNumber &key, size_t seed) */ /*! - \fn template Integer QTypeRevision::toEncodedVersion() const + \fn template = true> Integer QTypeRevision::toEncodedVersion() const Transforms the revision into an integer value, encoding the minor version into the least significant byte, and the major version into