From e5970cbfd4160ccf20a23e4bd733ee1ae1c1a60d Mon Sep 17 00:00:00 2001 From: Luca Di Sera Date: Fri, 3 Nov 2023 15:39:25 +0100 Subject: [PATCH] Doc: Fix template information for QPointer 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 some of the members of `QPointer` 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: Iefaa12a4ac4f05cb5dbadd126b920cfc6a118d91 Reviewed-by: Topi Reiniƶ --- src/corelib/kernel/qpointer.qdoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/corelib/kernel/qpointer.qdoc b/src/corelib/kernel/qpointer.qdoc index b82f736170..3cbc18b957 100644 --- a/src/corelib/kernel/qpointer.qdoc +++ b/src/corelib/kernel/qpointer.qdoc @@ -99,8 +99,8 @@ */ /*! - \fn template template QPointer::QPointer(QPointer &&other) - \fn template template QPointer::QPointer(const QPointer &other) + \fn template template = true> QPointer::QPointer(QPointer &&other) + \fn template template = true> QPointer::QPointer(const QPointer &other) \since 6.6 Conversion constructor. Constructs a new QPointer by moving or copying from @@ -113,7 +113,7 @@ */ /*! - \fn template template QPointer &QPointer::operator=(const QPointer &other) + \fn template template = true> QPointer &QPointer::operator=(const QPointer &other) \since 6.6 Conversion assignment operator. Makes this guarded pointer guard the @@ -124,7 +124,7 @@ */ /*! - \fn template template QPointer &QPointer::operator=(QPointer &&other) + \fn template template = true> &QPointer::operator=(QPointer &&other) \since 6.6.1 Conversion move-assignment operator. Makes this guarded pointer guard the @@ -202,7 +202,7 @@ */ /*! - \fn template bool QPointer::operator==(X *o, const QPointer &p) + \fn template template bool QPointer::operator==(X *o, const QPointer &p) Equality operator. Returns \c true if \a o and the guarded pointer \a p are pointing to the same object, otherwise @@ -210,7 +210,7 @@ */ /*! - \fn template bool QPointer::operator==(const QPointer &p, X *o) + \fn template template bool QPointer::operator==(const QPointer &p, X *o) Equality operator. Returns \c true if \a o and the guarded pointer \a p are pointing to the same object, otherwise @@ -218,7 +218,7 @@ */ /*! - \fn template bool QPointer::operator==(const QPointer &p1, const QPointer &p2) + \fn template template bool QPointer::operator==(const QPointer &p1, const QPointer &p2) Equality operator. Returns \c true if the guarded pointers \a p1 and \a p2 are pointing to the same object, otherwise @@ -241,21 +241,21 @@ */ /*! - \fn template bool QPointer::operator!=(const QPointer &p, X *o) + \fn template template bool QPointer::operator!=(const QPointer &p, X *o) Inequality operator. Returns \c true if \a o and the guarded pointer \a p are not pointing to the same object, otherwise returns \c false. */ /*! - \fn template bool QPointer::operator!=(X *o, const QPointer &p) + \fn template template bool QPointer::operator!=(X *o, const QPointer &p) Inequality operator. Returns \c true if \a o and the guarded pointer \a p are not pointing to the same object, otherwise returns \c false. */ /*! - \fn template bool QPointer::operator!=(const QPointer &p1, const QPointer &p2) + \fn template template bool QPointer::operator!=(const QPointer &p1, const QPointer &p2) Inequality operator. Returns \c true if the guarded pointers \a p1 and \a p2 are not pointing to the same object, otherwise