From 66a0fecfaeb85f5c7fe49e55289ec758aadc9eff Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 4 Jan 2018 11:23:37 +0100 Subject: doc: Correct remaining qdoc warnings in QStringView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ --- src/corelib/tools/qstringview.cpp | 25 ++++++++++++++++--------- src/corelib/tools/qstringview.h | 4 ++-- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/corelib/tools/qstringview.cpp b/src/corelib/tools/qstringview.cpp index f1abf13454..9cefcd4531 100644 --- a/src/corelib/tools/qstringview.cpp +++ b/src/corelib/tools/qstringview.cpp @@ -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 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 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 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 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 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 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. diff --git a/src/corelib/tools/qstringview.h b/src/corelib/tools/qstringview.h index 480021a165..4f7d48fe1d 100644 --- a/src/corelib/tools/qstringview.h +++ b/src/corelib/tools/qstringview.h @@ -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 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 -- cgit v1.2.3