diff options
author | David Faure <david.faure@kdab.com> | 2016-12-21 12:49:53 +0100 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2016-12-21 15:57:40 +0000 |
commit | b9edbb5d54290331f89a7ced4e4d7807098b61d7 (patch) | |
tree | 56c54e447d2c92aa4db2d39527208fbe7233e9ee /.gitignore | |
parent | baad82d242a4d8c1af6c87faaa7f25584183fd53 (diff) |
QLockFile: make sure we encode the hostname as UTF-8 in the lock file
We chose to use UTF-8 as it allows us to ensure there's no mistaking the
hostname in case the locale is changed, if the host name contains
characters outside of US-ASCII.
But this didn't work because the code that wrote the hostname always
used the local 8-bit codec instead of UTF-8. On Unix, we used the
result of gethostname(3) directly, which is supposedly on the locale codec.
This commit doesn't fix Windows, which requires _wgetenv, the plan being
to encapsulate that with a qEnvironmentVariable() method.
[ChangeLog][QtCore][QLockFile] Fixed a bug that caused QLockFile not to
recognize a stale lock file if the machine's hostname contained non-US-
ASCII characters, on Unix. A Windows fix is still pending.
Task-number: QTBUG-49640
Change-Id: Ib9d045544ff370ec901626658a84ec4e6575fe21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions