summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2023-11-03 15:28:56 +0100
committerLuca Di Sera <luca.disera@qt.io>2023-11-13 16:35:55 +0100
commite795898cc4387e81ef36c848acdc97bf745d5c8d (patch)
tree30a70c6742cb9c561152f198f5cdd63e3974a31e
parent848e312052b4c62cc77a153fb4564d8723c8a3cd (diff)
Doc: Fix template information for QTypeRevision 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 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ƶ <topi.reinio@qt.io>
-rw-r--r--src/corelib/tools/qversionnumber.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/tools/qversionnumber.cpp b/src/corelib/tools/qversionnumber.cpp
index dcb2a3ad64..75dadb6837 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<typename Integer> static bool QTypeRevision::isValidSegment(Integer segment)
+ \fn template<typename Integer, if_valid_segment_type<Integer> = 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 <typename Major, typename Minor> static QTypeRevision QTypeRevision::fromVersion(Major majorVersion, Minor minorVersion)
+ \fn template<typename Major, typename Minor, if_valid_segment_type<Major> = true, if_valid_segment_type<Minor> = 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 <typename Major> static QTypeRevision QTypeRevision::fromMajorVersion(Major majorVersion)
+ \fn template<typename Major, if_valid_segment_type<Major> = 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 <typename Minor> static QTypeRevision QTypeRevision::fromMinorVersion(Minor minorVersion)
+ \fn template<typename Minor, if_valid_segment_type<Minor> = 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 <typename Integer> static QTypeRevision QTypeRevision::fromEncodedVersion(Integer value)
+ \fn template<typename Integer, if_valid_value_type<Integer> = 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<typename Integer> Integer QTypeRevision::toEncodedVersion() const
+ \fn template<typename Integer, if_valid_value_type<Integer> = 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