diff options
| author | Ahmad Samir <a.samirh78@gmail.com> | 2025-11-13 14:14:06 +0200 |
|---|---|---|
| committer | Ahmad Samir <a.samirh78@gmail.com> | 2025-11-16 18:02:43 +0200 |
| commit | f5a6539d618eb7867698ac0f999b8be6f0c397cc (patch) | |
| tree | 2ea9a2c1cc2f84bffc9cebfeec21274567d61305 /src/corelib/text/qstring.cpp | |
| parent | 5dbb3b358950726447765e4fea7feb040a303860 (diff) | |
QString: fix docs, QChar::unicode() returns char16_t
Pointed out by Marc in code review.
Drive-by, use \c to markup ushort.
Pick-to: 6.10 6.8 6.5
Change-Id: I81e9997bd07d3c8e4093f42b3a9c2068d8ba4e6e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qstring.cpp')
| -rw-r--r-- | src/corelib/text/qstring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index c01c1a9999d..2cc1664c33e 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -7287,9 +7287,9 @@ QString QString::toUpper_helper(QString &str) string and \c{%s} arguments must be UTF-8 encoded. \note The \c{%lc} escape sequence expects a unicode character of type - \c char16_t, or \c ushort (as returned by QChar::unicode()). + \c char16_t (as returned by QChar::unicode()), or \c ushort. The \c{%ls} escape sequence expects a pointer to a zero-terminated array - of unicode characters of type \c char16_t, or ushort (as returned by + of unicode characters of type \c char16_t, or \c ushort (as returned by QString::utf16()). This is at odds with the printf() in the standard C++ library, which defines \c {%lc} to print a wchar_t and \c{%ls} to print a \c{wchar_t*}, and might also produce compiler warnings on platforms |
