fix language display error

This commit is contained in:
Syping 2018-02-05 10:33:22 +01:00
parent ebe8d616f2
commit 39a83200d2

View file

@ -227,9 +227,10 @@ void OptionsDialog::setupLanguageBox()
} }
QString aCurrentAreaLanguage = Translator->getCurrentAreaLanguage(); QString aCurrentAreaLanguage = Translator->getCurrentAreaLanguage();
if (QFile::exists(":/global/global." % currentAreaLanguage % ".loc")) if (QFile::exists(":/global/global." % aCurrentAreaLanguage % ".loc"))
{ {
QFile locFile(":/global/global." % currentAreaLanguage % ".loc"); qDebug() << "locFile found";
QFile locFile(":/global/global." % aCurrentAreaLanguage % ".loc");
if (locFile.open(QFile::ReadOnly)) if (locFile.open(QFile::ReadOnly))
{ {
aCurrentAreaLanguage = QString::fromUtf8(locFile.readLine()).trimmed(); aCurrentAreaLanguage = QString::fromUtf8(locFile.readLine()).trimmed();