qt5base-lts/tools/configure
Thiago Macieira b0afad8f0b Implement support for ref-qualified QString::toLatin1 & friends
This is the first step in implementing an in-place conversion of QString
to QByteArray. This requires ref-qualifiers in member functions so we
know that we have an rvalue QString.

Converting from UTF-16 to Latin1 always requires half the memory.

For conversion from UTF-16 to UTF-8, the typical string will also need
the same memory or less: characters from U+0000 to U+007F consume one
fewer byte; characters from U+0080 to U+07FF and from U+10000 to
U+1FFFFF occupy the same space in UTF-8 and UTF-16; it's only the ones
from U+0800 to U+FFFF that consume more space in the UTF-8 string.

For the locale's 8-bit codec, we can't be sure and the code (currently)
needs to go through QTextCodec anyway.

This requires a #define set before #include'ing "qstring.h". However,
since qstring.h is included by the QtCore PCH, we need an extra qmake
compiler without the PCH flags to compile this .cpp.

After this change, the distribution of calls in QtCore, Network, Gui,
and Widgets is as follows:

                  const &               &&
 toUtf8           31 (74%)              11 (26%)
 toLatin1         79 (77%)              24 (23%)
 toLocal8Bit      26 (16%)              138 (84%)

Change-Id: Idd96f9ddb51b989bc59f6da50054dd10c953dd4f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-13 09:29:58 +01:00
..
configure_pch.h Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
configure.pro Implement support for ref-qualified QString::toLatin1 & friends 2013-12-13 09:29:58 +01:00
configureapp.cpp Do not enable SSL autodetection for WinRT 2013-12-06 15:06:47 +01:00
configureapp.h bring the windows configure -qconfig handling in line with the unix one 2013-10-30 23:26:58 +01:00
environment.cpp Fix configure warnings on Windows 7 with MSVC2010. 2013-09-25 13:39:14 +02:00
environment.h add support for Visual Studio 2013 2013-07-04 12:54:58 +02:00
main.cpp Detect architecture before auto detection 2013-11-14 19:26:20 +01:00
Makefile.mingw Implement support for ref-qualified QString::toLatin1 & friends 2013-12-13 09:29:58 +01:00
Makefile.win32 Implement support for ref-qualified QString::toLatin1 & friends 2013-12-13 09:29:58 +01:00
tools.cpp fix configure -commercial 2013-09-11 15:52:51 +02:00
tools.h fix configure -commercial 2013-09-11 15:52:51 +02:00