qt5base-lts/util
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
..
accessibilityinspector Use Qt::SplitBehavior in preference to QString::SplitBehavior 2020-02-28 15:37:11 +01:00
aglfn Updated license headers 2016-01-21 18:55:18 +00:00
cmake pro2cmake.py: support multiple versions in QT_QML_SOURCE_VERSION 2020-08-23 11:05:15 +02:00
corelib/qurl-generateTLDs Use QList instead of QVector in util 2020-07-07 20:34:48 +02:00
edid Minor grammar fixup 2018-08-03 18:11:24 +00:00
glgen Remove the openglextensions module 2020-06-10 09:35:04 +02:00
gradientgen Replace Qt CONSTEXPR defines with constexpr 2020-08-14 15:52:58 +02:00
harfbuzz Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
includemocs QtCore: include mocs 2017-05-05 03:03:30 +00:00
integrity Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
lexgen Use QList instead of QVector in util 2020-07-07 20:34:48 +02:00
locale_database Fix handling of Suzhou numbering system 2020-07-17 12:19:01 +02:00
plugintest Updated license headers 2016-01-21 18:55:18 +00:00
qfloat16-tables Merge remote-tracking branch 'origin/5.13' into 5.14 2019-11-06 11:41:19 +01:00
unicode Use checked string iteration in case conversions 2020-08-29 18:15:27 +02:00
x86simdgen Move qsimd* from corelib/tools to corelib/global 2020-03-26 09:15:32 +01:00
xkbdatagen Updated license headers 2016-01-21 18:55:18 +00:00