fixed unicode problem in GlobalString parser
This commit is contained in:
parent
b1df9c0acb
commit
787bb81fda
1 changed files with 2 additions and 0 deletions
|
@ -32,6 +32,7 @@ QMap<QString, QString> GlobalString::getGlobalMap()
|
||||||
{
|
{
|
||||||
QMap<QString, QString> globalMap;
|
QMap<QString, QString> globalMap;
|
||||||
QSettings globalFile(getLanguageFile(), QSettings::IniFormat);
|
QSettings globalFile(getLanguageFile(), QSettings::IniFormat);
|
||||||
|
globalFile.setIniCodec("UTF-8");
|
||||||
globalFile.beginGroup("Global");
|
globalFile.beginGroup("Global");
|
||||||
QStringList globalStrList = globalFile.childKeys();
|
QStringList globalStrList = globalFile.childKeys();
|
||||||
foreach(const QString &globalStr, globalStrList)
|
foreach(const QString &globalStr, globalStrList)
|
||||||
|
@ -46,6 +47,7 @@ QString GlobalString::getString(QString valueStr, bool *ok)
|
||||||
{
|
{
|
||||||
QString globalString = valueStr;
|
QString globalString = valueStr;
|
||||||
QSettings globalFile(getLanguageFile(), QSettings::IniFormat);
|
QSettings globalFile(getLanguageFile(), QSettings::IniFormat);
|
||||||
|
globalFile.setIniCodec("UTF-8");
|
||||||
globalFile.beginGroup("Global");
|
globalFile.beginGroup("Global");
|
||||||
QStringList globalStrList = globalFile.childKeys();
|
QStringList globalStrList = globalFile.childKeys();
|
||||||
if (globalStrList.contains(valueStr))
|
if (globalStrList.contains(valueStr))
|
||||||
|
|
Loading…
Reference in a new issue