Fix QTemporaryFile regressions and new found issues
authorJoão Abecasis <joao.abecasis@nokia.com>
Tue, 16 Aug 2011 15:53:41 +0000 (17:53 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 21 Oct 2011 20:20:42 +0000 (22:20 +0200)
commitfd61059d359f0bee1c37d6bf08bf4b83381658ca
tree95ef7278c67801079d0b7b142e35e7cb88d90960
parentc9fde0d5902b3cee6cdd1514026d5ab04126f505
Fix QTemporaryFile regressions and new found issues

With this change, the file template is always processed in original
QString format. Trying to generate native paths before adding a missing
placeholder mask could change the meaning of templates, such as "." and
"..", which are now tested to mean "..XXXXXX" and "...XXXXXX",
respectively.

After ensuring the template includes a placeholder mask, the path is
converted to a native *absolute* file path and the mask is sought for
again. On Windows, native paths were already absolute. On Symbian, we'd
need at least a clean path, as "." and ",," are not natively understood.

There is a requirement that the placeholder mask /XXXXXX+/ makes it
through this conversion unaltered, which relaxes prior requirements on
*nix platforms. On Windows and Symbian the conversion is under Qt's
control and not user-configurable.

Reviewed-by: Shane Kearns
(cherry picked from commit 401722ef9e6fe79bd41f9d5f79668f5c4997c8e6)

Conflicts:

tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp

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