qt5base-lts/tests/auto/corelib
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
..
animation Update for failures only on dev branch. Use general platform names 2019-08-19 18:22:11 +02:00
codecs Port from QStringViewLiteral to u"" 2019-07-29 11:17:28 +03:00
global Fix encoding expected by tst_qmessagehandler::qMessagePattern() 2020-01-09 10:58:25 +01:00
io QFileSystemWatcher/win: watch also for attribute changes of directories 2020-01-10 06:24:14 +01:00
itemmodels Let QItemSelectionModel::columnIntersectsSelection honor the parent 2019-12-14 08:46:37 +01:00
kernel QObject: Replace more 0 and NULL with nullptr 2020-01-09 02:33:08 +01:00
mimetypes Remove handling of missing Q_COMPILER_RVALUE_REFS 2019-05-01 20:24:45 +00:00
plugin Disable debug-and-release builds for MinGW 2019-09-18 06:28:16 +00:00
serialization Don't wrap feature detection macros with QT_HAS_FOO() variants 2019-12-10 00:48:07 +01:00
statemachine QStateMachine: Don't scream at the user 2019-10-24 10:26:03 +02:00
text QString::isLower/isUpper: redo the implementation 2020-01-11 19:28:50 +01:00
thread Don't wrap feature detection macros with QT_HAS_FOO() variants 2019-12-10 00:48:07 +01:00
time Fix more mis-handling of spaces in ISO date format strings 2019-12-10 17:26:02 +01:00
tools Don't wrap feature detection macros with QT_HAS_FOO() variants 2019-12-10 00:48:07 +01:00
corelib.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00