diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-01-30 15:25:23 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-03-26 06:44:29 +0000 |
commit | 59928d23fc22d916dea32f02d810b8b24b74922d (patch) | |
tree | 5b1bc9c5e3cdb713e8cd716df8189bb3afd361c6 /src/corelib/tools/qtimezoneprivate_win.cpp | |
parent | 610a9e8f319eafcbcf193e4b90119a6f89d0caf9 (diff) |
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>
Diffstat (limited to 'src/corelib/tools/qtimezoneprivate_win.cpp')
0 files changed, 0 insertions, 0 deletions