qt6-bb10/tests/auto/corelib/text
Marc Mutz 928d57d8da QChar: add fromUcs{2,4}()
The fromUcs2() named ctor is designed to replace all the non-char
integral-type constructors of QChar which make it very hard to control
the implicit QChar conversions, which have caused a few bugs in Qt
itself. As a classical named contructor, it simply returns QChar.

The fromUcs4() named "ctor", however, needs to expand surrogate pairs,
and thus can't just return QChar. Instead, it returns a small struct
that contains one or two char16_t's, can be iterated over and be
implicitly converted to QStringView.  To avoid bikeshedding the name
(FromUcs4Result, of course :), it's defined inline and thus can't be
named outside the function. This function replaces most uses of
QChar::requiresSurrogates() in QtBase.

[ChangeLog][QtCore][QChar] Added fromUcs2(), fromUcs4().

Change-Id: I803708c14001040f75cb599e33c24a3fb8d2579c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-09 06:26:08 +00:00
..
qbytearray Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qbytearraylist Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qbytearraymatcher Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qbytedatabuffer Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qchar QChar: add fromUcs{2,4}() 2020-05-09 06:26:08 +00:00
qcollator Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qlatin1string Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qlocale Move a test of QLocale's methods out of tst_QDateTime 2020-05-08 09:50:24 +02:00
qregexp Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qregularexpression QRegularExpression: rename AnchoredMatchOption to AnchorAtOffsetMatchOption 2020-04-03 21:49:57 +02:00
qstring Remove useless code 2020-05-01 18:52:15 +02:00
qstring_no_cast_from_bytearray Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qstringapisymmetry tst_qstringapisymmetry: test split() with char16_t seps 2020-05-08 16:52:59 +02:00
qstringbuilder Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
qstringiterator Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qstringlist Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qstringmatcher Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qstringref Make QLocale(QString) explicit 2020-04-01 09:29:26 +01:00
qstringview tst_stringview: remove dead code 2020-05-08 21:11:17 +02:00
qtextboundaryfinder Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
.prev_CMakeLists.txt Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
CMakeLists.txt Port qtbase/tests/auto/corelib/text tests to CMake 2020-04-27 14:34:51 +02:00
text.pro