78cf89c07d
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> |
||
---|---|---|
.. | ||
qbytearray | ||
qbytearrayapisymmetry | ||
qbytearraylist | ||
qbytearraymatcher | ||
qbytearrayview | ||
qbytedatabuffer | ||
qchar | ||
qcollator | ||
qlatin1string | ||
qlocale | ||
qregularexpression | ||
qstring | ||
qstring_no_cast_from_bytearray | ||
qstringapisymmetry | ||
qstringbuilder | ||
qstringconverter | ||
qstringiterator | ||
qstringlist | ||
qstringmatcher | ||
qstringtokenizer | ||
qstringview | ||
qtextboundaryfinder | ||
.prev_CMakeLists.txt | ||
CMakeLists.txt | ||
text.pro |