Fix QString{Encoder|Decoder} documentation

Change-Id: I8e29846db77581953d90c818060950744cb9f521
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Karsten Heimrich 2020-06-17 22:34:40 +02:00
parent 3ce2fab0a6
commit c1e5044d22
2 changed files with 13 additions and 11 deletions

View File

@ -1790,7 +1790,7 @@ const char *QStringConverter::nameForEncoding(QStringConverter::Encoding e)
*/
/*!
\fn QByteArray QStringEncoder::operator()(const QStringView in)
\fn QByteArray QStringEncoder::operator()(QStringView in)
\overload
Converts \a in and returns the data as a byte array.
@ -1884,23 +1884,25 @@ const char *QStringConverter::nameForEncoding(QStringConverter::Encoding e)
*/
/*!
\fn QByteArray QStringDecoder::operator()(const QString &in)
\fn QString QStringDecoder::operator()(const QByteArray &ba)
Converts \a in and returns the data as a QString.
Converts \a ba and returns the data as a QString.
*/
/*!
\fn QByteArray QStringDecoder::operator()(const QStringView in)
\fn QString QStringDecoder::operator()(const char *in, qsizetype size)
\overload
Converts \a in and returns the data as a QString.
Converts a byte array containing the first \a size bytes of the array \a in
and returns the data as a QString.
*/
/*!
\fn QByteArray QStringDecoder::operator()(const QChar *in, qsizetype length)
\fn QString QStringDecoder::operator()(const char *chars)
\overload
Converts \a length QChars from \a in and returns the data as a QString.
Converts \a chars and returns the data as a QString. \a chars is assumed to
point to a \c{\0}-terminated string and its length is determined dynamically.
*/
/*!

View File

@ -207,9 +207,9 @@ public:
{}
#if defined(Q_QDOC)
QString operator()(const QString &);
QString operator()(QStringView);
QString operator()(const QChar *, qsizetype);
QByteArray operator()(const QString &in);
QByteArray operator()(QStringView in);
QByteArray operator()(const QChar *in, qsizetype length);
#else
template<typename T>
struct DecodedData
@ -268,7 +268,7 @@ public:
#if defined(Q_QDOC)
QString operator()(const QByteArray &ba);
QString operator()(const char *in, qsizetype length);
QString operator()(const char *in, qsizetype size);
QString operator()(const char *chars);
#else
template<typename T>