qt6-bb10/tests/auto/corelib
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
..
animation Merge remote-tracking branch 'origin/5.15' into dev 2020-03-16 18:41:27 +01:00
codecs Clean up memory 2020-04-17 11:24:35 +02:00
global CMake: Fix build of qlogging test on MinGW 2020-04-30 10:13:22 +02:00
io Handle disk full situations by skipping QFile::moveToTrash test 2020-05-07 14:27:17 +02:00
itemmodels Remove QRegExp support from QSortFilterProxyModel 2020-04-15 14:38:40 +02:00
kernel Fix crash when using QProperty<T>::setBinding(Functor ...) 2020-04-30 19:39:42 +02:00
mimetypes QtConcurrent::run: accept more then five function's arguments 2020-03-11 14:46:25 +01:00
plugin Change qHash() to work with size_t instead of uint 2020-04-09 20:03:25 +02:00
serialization Remove Perforce commands from setupSuite.sh 2020-05-05 12:24:38 -07:00
statemachine Merge remote-tracking branch 'origin/5.15' into dev 2020-02-13 18:31:40 +01:00
text QChar: add fromUcs{2,4}() 2020-05-09 06:26:08 +00:00
thread QFuture: the result type doesn't have to be a default-constructible 2020-04-23 17:09:52 +02:00
time Catch overflow in QDateTime::fromSecsSinceEpoch() 2020-05-08 09:51:24 +02:00
tools QChar: make std::hash'able 2020-05-05 18:58:26 +02:00
.prev_CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
corelib.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00