diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2018-05-20 20:51:13 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2018-05-23 08:29:15 +0000 |
commit | 2f72d564c906a4a4ff64bc6b92bb9abe64f9c6dd (patch) | |
tree | 007c16944791d282893aaf229dd45f26f56adedf /src/virtualkeyboard/hunspellinputmethod_p.cpp | |
parent | 6453b44742d709f4e3cc46bf5f5b8d0cef64bb66 (diff) |
Fix encoding of path environment variables
This change modifies encoding of the following environment variables:
- QT_VIRTUALKEYBOARD_HUNSPELL_DATA_PATH
- QT_VIRTUALKEYBOARD_PINYIN_DICTIONARY
- QT_VIRTUALKEYBOARD_CANGJIE_DICTIONARY
- QT_VIRTUALKEYBOARD_ZHUYIN_DICTIONARY
- QT_VIRTUALKEYBOARD_PHRASE_DICTIONARY
- QT_VIRTUALKEYBOARD_LAYOUT_PATH
- LIPI_ROOT
- LIPI_LIB
Previously they were read using qgetenv and latin1 encoding. Now they
are read using qEnvironmentVariable, which handles the encoding properly.
[ChangeLog] Fixed encoding of path environment variables.
Task-number: QTBUG-62328
Change-Id: I8e32c111a498d3b57259fe6dd96290545f10030a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/virtualkeyboard/hunspellinputmethod_p.cpp')
-rw-r--r-- | src/virtualkeyboard/hunspellinputmethod_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/virtualkeyboard/hunspellinputmethod_p.cpp b/src/virtualkeyboard/hunspellinputmethod_p.cpp index 0f4bc25a..3a97e683 100644 --- a/src/virtualkeyboard/hunspellinputmethod_p.cpp +++ b/src/virtualkeyboard/hunspellinputmethod_p.cpp @@ -71,7 +71,7 @@ bool HunspellInputMethodPrivate::createHunspell(const QString &locale) return false; if (this->locale != locale) { hunspellWorker->removeAllTasks(); - QString hunspellDataPath(QString::fromLatin1(qgetenv("QT_VIRTUALKEYBOARD_HUNSPELL_DATA_PATH").constData())); + QString hunspellDataPath(qEnvironmentVariable("QT_VIRTUALKEYBOARD_HUNSPELL_DATA_PATH")); const QString pathListSep( #if defined(Q_OS_WIN32) QStringLiteral(";") |