summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-23 11:57:02 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-23 16:59:08 +0200
commit3299476791d60ead8e032aa24c1167a3a7cffe3a (patch)
treebebe80757be75f2ea317812b5967ba69c9e4ea07 /src
parent1cbfaebfc9e493b4033ab39739ba1dbaa192951a (diff)
Fix qdoc warnings for QByteArrayView
Provide simplified declaration of fromArray for qdoc runs; fix a small typo. Change-Id: I8c7300a014270e8ab7f18afd94ee66af4734e0c7 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/text/qbytearrayview.h5
-rw-r--r--src/corelib/text/qbytearrayview.qdoc8
2 files changed, 8 insertions, 5 deletions
diff --git a/src/corelib/text/qbytearrayview.h b/src/corelib/text/qbytearrayview.h
index 079f888f4b..4934294a81 100644
--- a/src/corelib/text/qbytearrayview.h
+++ b/src/corelib/text/qbytearrayview.h
@@ -203,10 +203,13 @@ public:
constexpr QByteArrayView(const char (&data)[Size]) noexcept
: QByteArrayView(data, lengthHelperCharArray(data, Size)) {}
+#ifdef Q_QDOC
+ template <typename Byte, size_t Size>
+#else
template <typename Byte, size_t Size, if_compatible_byte<Byte> = true>
+#endif
[[nodiscard]] constexpr static QByteArrayView fromArray(const Byte (&data)[Size]) noexcept
{ return QByteArrayView(data, Size); }
-
[[nodiscard]] inline QByteArray toByteArray() const; // defined in qbytearray.h
[[nodiscard]] constexpr qsizetype size() const noexcept { return m_size; }
diff --git a/src/corelib/text/qbytearrayview.qdoc b/src/corelib/text/qbytearrayview.qdoc
index 839a956249..36571e53d4 100644
--- a/src/corelib/text/qbytearrayview.qdoc
+++ b/src/corelib/text/qbytearrayview.qdoc
@@ -256,7 +256,7 @@
*/
/*!
- \fn template <size_t Size> QByteArrayView(const char (&data)[Size])
+ \fn template <size_t Size> QByteArrayView::QByteArrayView(const char (&data)[Size])
Constructs a byte array view on the char array \a data.
The view covers the array until the first \c{'\0'} is encountered,
@@ -302,7 +302,7 @@
*/
/*!
- \fn template <typename Byte, size_t Size> static QByteArrayView QByteArrayView::fromArray(Byte (&data)[Size])
+ \fn template <typename Byte, size_t Size> QByteArrayView QByteArrayView::fromArray(const Byte (&data)[Size])
Constructs a byte array view on the array literal \a data. The view covers the full
array. That includes the trailing null-terminator of \c{char} array literals.
@@ -602,7 +602,7 @@
\note The behavior is undefined when \a length < 0 or \a length > size().
- \sa first(), last(), sliced(), right(), chopped(), chop()
+ \sa first(), last(), sliced(), chopped(), chop()
*/
/*!
@@ -677,7 +677,7 @@
*/
/*!
- \fn qizetype QByteArrayView::count(QByteArrayView bv) const
+ \fn qsizetype QByteArrayView::count(QByteArrayView bv) const
Returns the number of (potentially overlapping) occurrences of the
sequence of bytes viewed by \a bv in this byte array view.