summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-08-05 10:49:44 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-21 22:20:34 +0200
commitc9fde0d5902b3cee6cdd1514026d5ab04126f505 (patch)
tree263520b1e5774e25029e8a0fe51d1d6969f6ea09 /tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
parent69dd45c2d8a1a548b257693f6fdb6f1925d7f39f (diff)
Use "native paths" on POSIX platforms as well
And don't rely solely on "local8Bit" conversions. QFile defines an API for overriding how encoding conversions are done for filenames. In generating unique names, QTemporaryFile ignored that API and hardcoded the use of local 8-bit, implicitly assuming that that was appropriate. With this change, we switch that assumption to one where user supplied encoding function keeps the byte value of 'X' and '/', also assuming that encoded 'X' takes up a single-byte (i.e., the byte sequence for "XXXXXX" remains unchanged). There was also, and there still is an assumption in name generation that byte values for ASCII alpha-numeric characters are valid in the "native" encoding. In practice this change is compatible with UTF-8, Latin-1 and other ISO/IEC 8859 encodings. At any rate, it's very likely that only UTF-8 is relevant here. Reviewed-by: Denis Dzyubenko (cherry picked from commit 0de701d01cb221464eed773fd3751aff73fe4d60) Change-Id: I9ee0fe8e3cad48694d5ec9a2bedd5412cfc0d172 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Diffstat (limited to 'tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp')
0 files changed, 0 insertions, 0 deletions