diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-05-29 15:29:23 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-05-29 18:24:29 +0200 |
commit | b5e0bb9152d5ffd737f8cc99aa05d6625fc585c2 (patch) | |
tree | 23dc21aa70cee1c0c555e32f0c3db82843289eb2 /src/corelib/io/qstandardpaths_unix.cpp | |
parent | 1a872e5ff2ce538960c54986e09dcb5eb8d4bd63 (diff) |
QWindowsFileSystemWatcher: optimize qWarning() use
The first two changes avoid creation of a temporary QString and QByteArray each,
by realisiing that QChar is more-or-less wchar_t on Windows and so we can just
use %ls to print the wchar_t array directly.
In msgFindNextFailed(), remove the inline keyword and mark the function as cold
(not sure this has any effect on Windows). When building the result, don't use
QTextStream. Everything that is streamed is text, so just use QString::op+=.
When using the result, use qUtf16Printable and %ls instead of qPrintable and %s,
to avoid the creation of a temporary QByteArray.
Change-Id: I09f576b894761fe342109b386c1de3532200e03c
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qstandardpaths_unix.cpp')
0 files changed, 0 insertions, 0 deletions