From 25b754dbf12e8e8bef363cd2cc0c89e7ea7c0ef9 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Wed, 16 Oct 2024 15:38:33 +0300 Subject: [PATCH] QStringView: de-duplicate some API docs Change-Id: I736874037780147c2ec0d657689fa4f3066ebe7d Reviewed-by: Thiago Macieira (cherry picked from commit 0130ba3cbd43f532726e4db39daf3f64295c861e) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/text/qstringview.cpp | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/corelib/text/qstringview.cpp b/src/corelib/text/qstringview.cpp index 65df78dfda1..0381e2bec5e 100644 --- a/src/corelib/text/qstringview.cpp +++ b/src/corelib/text/qstringview.cpp @@ -189,9 +189,11 @@ QT_BEGIN_NAMESPACE The behavior is undefined if \a len is negative or, when positive, if \a str is \nullptr. +//! [compatible-char-types] This constructor only participates in overload resolution if \c Char is a compatible character type. The compatible character types are: \c QChar, \c ushort, \c char16_t and (on platforms, such as Windows, where it is a 16-bit type) \c wchar_t. +//! [compatible-char-types] */ /*! @@ -208,10 +210,7 @@ QT_BEGIN_NAMESPACE The behavior is undefined if \a last precedes \a first, or \a first is \nullptr and \a last is not. - This constructor only participates in overload resolution if \c Char - is a compatible character type. The compatible character types - are: \c QChar, \c ushort, \c char16_t and (on platforms, such as - Windows, where it is a 16-bit type) \c wchar_t. + \include qstringview.cpp compatible-char-types */ /*! @@ -224,11 +223,7 @@ QT_BEGIN_NAMESPACE Passing \nullptr as \a str is safe and results in a null string view. - This constructor only participates in overload resolution if \a - str is not an array and if \c Char is a compatible character - type. The compatible character types are: \c QChar, \c ushort, \c - char16_t and (on platforms, such as Windows, where it is a 16-bit - type) \c wchar_t. + \include qstringview.cpp compatible-char-types */ /*! @@ -242,11 +237,7 @@ QT_BEGIN_NAMESPACE \a string must remain valid for the lifetime of this string view object. - This constructor only participates in overload resolution if \a - string is an actual array and \c Char is a compatible character - type. The compatible character types are: \c QChar, \c ushort, \c - char16_t and (on platforms, such as Windows, where it is a 16-bit - type) \c wchar_t. + \include qstringview.cpp compatible-char-types \sa fromArray */