path: root/tests
diff options
authorJoão Abecasis <>2011-08-05 10:49:44 +0200
committerQt by Nokia <>2011-10-21 22:20:34 +0200
commitc9fde0d5902b3cee6cdd1514026d5ab04126f505 (patch)
tree263520b1e5774e25029e8a0fe51d1d6969f6ea09 /tests
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 <>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions