qt5base-lts/tests/auto/corelib/tools/qlocale
Marc Mutz 59928d23fc Port QLocalePrivate::*ToCode() to QLatin1String
The returned data is in US-ASCII (or else Latin-1), and resides in
consecutive memory. We can therefore return it in a QLatin1String,
which, however, will in general not be NUL-terminated.

Many users use the return value as part of a QStringBuilder
expression, and those which are not are not pessimized further by
this change.

The caller in qtimezoneprivate_icu looks as if it could simply zero
-terminate the return value and use it as-is, as opposed to
converting to UTF-8, but I left the code equivalent to the original
just the same.

Change-Id: I0e628af8c1320fcff8d0aacf160e859681d2b85a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-26 06:44:29 +00:00
..
syslocaleapp Updated license headers 2016-01-21 18:55:18 +00:00
test macOS: Don't build auto-tests as application bundles unless explicitly requested 2016-10-23 10:39:56 +00:00
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
qlocale.pro Fix compilation for WinRT 2015-12-14 08:43:15 +00:00
tst_qlocale.cpp Port QLocalePrivate::*ToCode() to QLatin1String 2017-03-26 06:44:29 +00:00