qt5base-lts/tests/auto/corelib/tools/qstring
Thiago Macieira ee7536876c Add the UTF16-to-Latin1 in-place converter
This is only possible for two important reasons:

1) QString and QByteArray d pointers are both done with QArrayData and
   that class does not care that the alignof(T) changes from 2 to 1,
   so we can give the pointer from QString to QByteArray
   (after adapting the allocated size, which is now double)

2) conversion from UTF16 to Latin1 always has fewer bytes (exactly half)

Change-Id: I17b2690c910f3de8db55156c6d6b5f55be06d827
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-13 09:30:04 +01:00
..
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
double_data.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qstring.pro Add Mac type conversion functions to QtCore 2013-09-21 05:09:41 +02:00
tst_qstring_mac.mm Add Mac type conversion functions to QtCore 2013-09-21 05:09:41 +02:00
tst_qstring.cpp Add the UTF16-to-Latin1 in-place converter 2013-12-13 09:30:04 +01:00