qt5base-lts/tests/auto/corelib/text
Giuseppe D'Angelo 577d698b8e QString::isLower/isUpper: redo the implementation
Use QStringIterator rather than indexed loops. This fixes handling of
non-BMP code points (which may be lower or uppercase, see the test).

Change also the semantics of the functions, adopting Unicode §3.13
definitions: a string is lowercase/uppercase if it's equal to its
own toLower/toUpper folding.

As a side effect, empty strings are now correctly reported to be
lowercase AND uppercase.

[ChangeLog][Important Behavior Changes] The semantics of
QString::isLower() and QString::isUpper() have been changed to match the
Unicode specification. Now lowercase (resp. uppercase) strings are
allowed to contain any character; a string is considered lowercase
(resp. uppercase) if it's equal to its own toLower() (resp. toUpper())
folding.  Previously, a non-letter character would make the string not
lowercase nor uppercase, and the mere presence of an uppercase (resp.
lowercase) letter would make isLower() (resp. isUpper()) return false,
even if the letter wouldn't change under case folding.  As a
consequence, now empty strings are lowercase and uppercase.

[ChangeLog][QtCore][QString] Fixed a number of bugs of
QString::isLower() and QString::isUpper(). Empty strings are now
correctly reported to be lowercase (resp. uppercase), and strings
containing code points outside the BMP are now correctly handled.
Note that the behavior of these functions has also been changed.

Change-Id: Iba1398279a072399a9f21295fe75f6e414f3f813
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-11 19:28:50 +01:00
..
qbytearray Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qbytearraylist Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qbytearraymatcher Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qbytedatabuffer Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qchar Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qcollator Move a test for feature ICU from .pro to .cpp 2019-10-25 11:41:30 +02:00
qlatin1string Deprecate QStringViewLiteral 2019-08-10 22:13:49 +02:00
qlocale QLocale: Support Indian number formatting 2019-12-30 13:04:23 +02:00
qregexp Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qregularexpression Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstring QString::isLower/isUpper: redo the implementation 2020-01-11 19:28:50 +01:00
qstring_no_cast_from_bytearray Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringapisymmetry Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringbuilder Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringiterator Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringlist Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringmatcher Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringref Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
qstringview Deprecate QStringViewLiteral 2019-08-10 22:13:49 +02:00
qtextboundaryfinder Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00
text.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00