doc: Correct remaining qdoc warnings in QStringView

Added missing template clause to \fn commands required by clang-qdoc.
Changed a few Q_QDOC macros to Q_CLANG_QDOC.

Change-Id: I20e6855b13df6384b471fc2bb5de27b0e3b44d1b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This commit is contained in:
Martin Smith 2018-01-04 11:23:37 +01:00
parent 81e4d039a9
commit 66a0fecfae
2 changed files with 18 additions and 11 deletions

View File

@ -116,6 +116,13 @@ QT_BEGIN_NAMESPACE
\sa QString, QStringRef
*/
/*!
\typedef QStringView::storage_type
Alias for \c{char16_t} for non-Windows or if Q_COMPILER_UNICODE_STRINGS
is defined. Otherwise, alias for \c{wchar_t}.
*/
/*!
\typedef QStringView::value_type
@ -224,7 +231,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn QStringView::QStringView(const Char *str, qsizetype len)
\fn template <typename Char> QStringView::QStringView(const Char *str, qsizetype len)
Constructs a string view on \a str with length \a len.
@ -240,7 +247,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn QStringView::QStringView(const Char *first, const Char *last)
\fn template <typename Char> QStringView::QStringView(const Char *first, const Char *last)
Constructs a string view on \a first with length (\a last - \a first).
@ -260,7 +267,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn QStringView::QStringView(const Char *str)
\fn template <typename Char> QStringView::QStringView(const Char *str)
Constructs a string view on \a str. The length is determined
by scanning for the first \c{Char(0)}.
@ -277,7 +284,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn QStringView::QStringView(const Char (&string)[N])
\fn template <typename Char, size_t N> QStringView::QStringView(const Char (&string)[N])
Constructs a string view on the character string literal \a string.
The length is set to \c{N-1}, excluding the trailing \{Char(0)}.
@ -319,7 +326,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn QStringView::QStringView(const StdBasicString &str)
\fn template <typename StdBasicString> QStringView::QStringView(const StdBasicString &str)
Constructs a string view on \a str. The length is taken from \c{str.size()}.
@ -713,7 +720,7 @@ QT_BEGIN_NAMESPACE
The behavior is undefined if the string contains non-Latin1 characters.
\sa toUtf8(), toLocal8Bit(), QTextCodec, qConvertToLatin1()
\sa toUtf8(), toLocal8Bit(), QTextCodec
*/
/*!
@ -739,7 +746,7 @@ QT_BEGIN_NAMESPACE
UTF-8 is a Unicode codec and can represent all characters in a Unicode
string like QString.
\sa toLatin1(), toLocal8Bit(), QTextCodec, qConvertToUtf8()
\sa toLatin1(), toLocal8Bit(), QTextCodec
*/
/*!
@ -758,7 +765,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn qToStringViewIgnoringNull(const QStringLike &s);
\fn template <typename QStringLike> qToStringViewIgnoringNull(const QStringLike &s);
\since 5.10
\internal
@ -773,7 +780,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn bool QStringView::isRightToLeft();
\fn bool QStringView::isRightToLeft() const
\since 5.11
Returns \c true if the string is read right to left.

View File

@ -183,7 +183,7 @@ public:
Q_DECL_CONSTEXPR QStringView(const Char *f, const Char *l)
: QStringView(f, l - f) {}
#ifdef Q_QDOC
#ifdef Q_CLANG_QDOC
template <typename Char, size_t N>
Q_DECL_CONSTEXPR QStringView(const Char (&array)[N]) Q_DECL_NOTHROW;
@ -199,7 +199,7 @@ public:
: QStringView(str, str ? lengthHelperPointer(str) : 0) {}
#endif
#ifdef Q_QDOC
#ifdef Q_CLANG_QDOC
QStringView(const QString &str) Q_DECL_NOTHROW;
QStringView(const QStringRef &str) Q_DECL_NOTHROW;
#else