diff --git a/src/corelib/text/qchar.cpp b/src/corelib/text/qchar.cpp index 7b114e9723b..bf2a2a7e365 100644 --- a/src/corelib/text/qchar.cpp +++ b/src/corelib/text/qchar.cpp @@ -1588,6 +1588,11 @@ char32_t QChar::toLower(char32_t ucs4) noexcept Returns the uppercase equivalent if the character is lowercase or titlecase; otherwise returns the character itself. + + \note This function also returns the original character in the rare case of + the uppercase form of the character requiring two or more characters. + + \sa QString::toUpper() */ /*! @@ -1596,7 +1601,12 @@ char32_t QChar::toLower(char32_t ucs4) noexcept by \a ucs4 if the character is lowercase or titlecase; otherwise returns the character itself. + \note This function also returns the original character in the rare case of + the uppercase form of the character requiring two or more characters. + \note Before Qt 6, this function took a \c uint argument and returned \c uint. + + \sa QString::toUpper() */ char32_t QChar::toUpper(char32_t ucs4) noexcept { diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index f9edd124d72..35e2707ac7e 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -3457,6 +3457,9 @@ Qt::LayoutDirection QLocale::textDirection() const Otherwise the conversion may be done in a platform-dependent manner, with QString::toUpper() as a generic fallback. + \note In some cases the uppercase form of a string may be longer than the + original. + \sa QString::toUpper() */ QString QLocale::toUpper(const QString &str) const diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 8e4a625b1fd..cdb884b79f6 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -7247,7 +7247,10 @@ QString QString::toCaseFolded_helper(QString &str) \snippet qstring/main.cpp 81 The case conversion will always happen in the 'C' locale. For - locale-dependent case folding use QLocale::toUpper() + locale-dependent case folding use QLocale::toUpper(). + + \note In some cases the uppercase form of a string may be longer than the + original. \sa toLower(), QLocale::toLower() */