Doc: Fix template information for QStringView 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 `QStringView` 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: Ia5c6f99d38b0080b150cbfca83ae605cc07d9b72
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This commit is contained in:
Luca Di Sera 2023-11-03 15:24:25 +01:00
parent 1fcfc8f94d
commit 482d11fdbe

View File

@ -179,7 +179,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn template <typename Char> QStringView::QStringView(const Char *str, qsizetype len)
\fn template <typename Char, if_compatible_char<Char> = true> QStringView::QStringView(const Char *str, qsizetype len)
Constructs a string view on \a str with length \a len.
@ -195,7 +195,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn template <typename Char> QStringView::QStringView(const Char *first, const Char *last)
\fn template <typename Char, if_compatible_char<Char> = true> QStringView::QStringView(const Char *first, const Char *last)
Constructs a string view on \a first with length (\a last - \a first).
@ -281,7 +281,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn template <typename Char, size_t Size> static QStringView QStringView::fromArray(const Char (&string)[Size]) noexcept
\fn template <typename Char, size_t Size, if_compatible_char<Char> = true> static QStringView QStringView::fromArray(const Char (&string)[Size]) noexcept
Constructs a string view on the full character string literal \a string,
including any trailing \c{Char(0)}. If you don't want the