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 +#else template = 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 QByteArrayView(const char (&data)[Size]) + \fn template 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 static QByteArrayView QByteArrayView::fromArray(Byte (&data)[Size]) + \fn template 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.