qt5base-lts/tests/auto/corelib
Edward Welbourne 78cf89c07d Use checked string iteration in case conversions
The Unicode table code can only be safely called on valid code-points.
So code that calls it must only pass it valid Unicode data. The string
iterator's Unchecked Unchecked methods only provide this guarantee
when the string being iterated is guaranteed to be valid UTF-16; while
client code should only use QString, QStringView and friends on valid
UTF-16 data, we have no way to be sure they have respected that.

So take the few extra cycles to actually check validity in the course
of iterating strings, when the resulting code-points are to be passed
to the Unicode table look-ups. Add tests that case mapping doesn't
access Unicode tables out of range (it'll trigger the new assertion).
Added some comments to qchar.h that helped me understand surrogates.

Change-Id: Iec2c3106bf1a875bdaa1d622f6cf94d7007e281e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-29 18:15:27 +02:00
..
animation Fix warning when printing of qsizetype 2020-07-26 17:39:31 +02:00
global Remove remaining traces of deprecated QtMsgHandler 2020-08-29 16:24:21 +02:00
io QStandardPaths/Unix: improve the XDG_RUNTIME_DIR creation/detection 2020-08-25 16:13:44 -07:00
itemmodels Automatically register data/debug stream operations in QMetaType 2020-08-24 00:17:03 +02:00
kernel Make QTranslator::load() insist that its return value be checked 2020-08-28 21:26:21 +02:00
mimetypes Fix warnings about unused expression results in tests 2020-07-29 14:33:29 +02:00
plugin Make QUUid constructors from string like types explicit 2020-08-27 18:58:21 +02:00
serialization Change QByteArray to handle large arrays 2020-08-27 18:58:20 +02:00
text Use checked string iteration in case conversions 2020-08-29 18:15:27 +02:00
thread Fix QFuture::waitForFinished to wait until QFuture is started 2020-08-26 16:37:43 +02:00
time Fix crash on serializing default-constructed QTimeZone 2020-08-23 09:55:29 +02:00
tools Purge qalgorithm.h of deprecated API 2020-08-28 21:22:32 +02:00
.prev_CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
CMakeLists.txt Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
corelib.pro Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00