From 4ccd4118f4e5f4f22483651ad50b46f0eae30e51 Mon Sep 17 00:00:00 2001 From: Luca Di Sera Date: Fri, 3 Nov 2023 15:37:15 +0100 Subject: [PATCH] Doc: Fix template information for two QUtf8StringView constructors 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 `QUtf8StringView::QUtf8StringView(const Char*, qsizetype)` and `QUtf8StringView::QUtf8StringView(const Char*, const Char*)` are not in sync with their intended target template declaration. Hence, add the missing information to the relevant "\fn" commands. Task-number: QTBUG-118080 Change-Id: I916e840677f26d855f0bd825e6a913100ac261e2 Reviewed-by: Topi Reiniƶ --- src/corelib/text/qutf8stringview.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/text/qutf8stringview.qdoc b/src/corelib/text/qutf8stringview.qdoc index 5f3d7509f7..7f22e2a70b 100644 --- a/src/corelib/text/qutf8stringview.qdoc +++ b/src/corelib/text/qutf8stringview.qdoc @@ -217,7 +217,7 @@ */ /*! - \fn template QUtf8StringView::QUtf8StringView(const Char *str, qsizetype len) + \fn template = true> QUtf8StringView::QUtf8StringView(const Char *str, qsizetype len) Constructs a string view on \a str with length \a len. @@ -233,7 +233,7 @@ */ /*! - \fn template QUtf8StringView::QUtf8StringView(const Char *first, const Char *last) + \fn template = true> QUtf8StringView::QUtf8StringView(const Char *first, const Char *last) Constructs a string view on \a first with length (\a last - \a first).