Minimize encoding conversions when generating unique file name
authorJoão Abecasis <joao.abecasis@nokia.com>
Fri, 5 Aug 2011 08:58:08 +0000 (10:58 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 21 Oct 2011 20:20:09 +0000 (22:20 +0200)
commita4a09488ee979849f4e9b9b3b8590ad2a2472590
treef285805c687a6a60873f276728ef18569398eb89
parentb3ca1d4a84ee65e9f9f1e1a4e6de9078279e2187
Minimize encoding conversions when generating unique file name

With minor adjustments, createFileFromTemplate is made to work directly
on (UTF-16) QString data, which is already in the native encoding for
Windows and Symbian. This is possible because the function only fills
out the placeholder sub-string, without touching adjacent characters.

This eliminates unnecessary conversions on those platforms.

Reviewed-by: Gareth Stockwell
Reviewed-by: Shane Kearns
(cherry picked from commit 9a76587363a2f37312326286e08cce502f7fe27e)

Change-Id: I8732b88ece5e2befb2da2e717758954c9aa7e5b0
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
src/corelib/io/qtemporaryfile.cpp