summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-12 13:27:22 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-13 10:48:38 +0200
commit3206840b0e7d6895285122872fa0e7dc038e4865 (patch)
treead9f6f6048cee087aaf9cb98fecc5f01d779b654 /src/corelib
parent5b94f8874721014a784fd79fcd5e5ea2ba4d28cc (diff)
Fix qdoc warning, \function is not a command
Document the size parameter while at it, and rephrase a bit. This introduces a new qdoc warning since QtLiteral is a new namespace without any documentation, but that's for a separate commit. Change-Id: I849d5cdde8b64dbbe7e6a526214d422930091cd4 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/text/qbytearray.cpp16
-rw-r--r--src/corelib/text/qstring.cpp16
2 files changed, 18 insertions, 14 deletions
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
index 677fc6d6ac..3a0f28f444 100644
--- a/src/corelib/text/qbytearray.cpp
+++ b/src/corelib/text/qbytearray.cpp
@@ -4767,17 +4767,19 @@ QByteArray QByteArray::toPercentEncoding(const QByteArray &exclude, const QByteA
*/
/*!
- \function QtLiterals::operator""_qba(const char *str, size_t size)
+ \fn QtLiterals::operator""_qba(const char *str, size_t size)
\relates QByteArray
\since 6.2
- Literal operator that creates a QByteArray out of a char string literal \a
- str. Creating a QByteArray from it is free in this case, and the generated
- string data is stored in the read-only segment of the compiled object file.
- Duplicate literals may share the same read-only memory. This functionality is
- interchangeable with QByteArrayLiteral, but saves typing when many string
- literals are present in the code.
+ Literal operator that creates a QByteArray out of the first \a size characters
+ in the char string literal \a str.
+
+ The QByteArray is created at compile time, and the generated string data is stored
+ in the read-only segment of the compiled object file. Duplicate literals may share
+ the same read-only memory. This functionality is interchangeable with
+ QByteArrayLiteral, but saves typing when many string literals are present in the
+ code.
The following code creates a QByteArray:
\code
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 3455daa3ca..a690aac936 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -10506,17 +10506,19 @@ QString QString::toHtmlEscaped() const
*/
/*!
- \function QtLiterals::operator""_qs(const char16_t *str, size_t size)
+ \fn QtLiterals::operator""_qs(const char16_t *str, size_t size)
\relates QString
\since 6.2
- Literal operator that creates a QString out of a char16_t string literal \a
- str. Creating a QString from it is free in this case, and the generated string
- data is stored in the read-only segment of the compiled object file. Duplicate
- literals may share the same read-only memory. This functionality is
- interchangeable with QStringLiteral, but saves typing when many string
- literals are present in the code.
+ Literal operator that creates a QString out of the first \a size characters in
+ the char16_t string literal \a str.
+
+ The QString is created at compile time, and the generated string data is stored
+ in the read-only segment of the compiled object file. Duplicate literals may
+ share the same read-only memory. This functionality is interchangeable with
+ QStringLiteral, but saves typing when many string literals are present in the
+ code.
The following code creates a QString:
\code