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 bcd72e7f5e4..33d4ccb1df6 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -3403,6 +3403,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 ad529447fc3..75cbfd49c05 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -7239,7 +7239,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() */