Really fix config file migration not being done.

This commit is contained in:
Ghislain MARY 2017-06-14 13:49:00 +02:00
parent 6d52bb0468
commit 8dbb3217e3

View file

@ -448,12 +448,15 @@ void App::createNotifier () {
void App::initLocale () {
// Try to use preferred locale.
QString locale = ::Utils::coreStringToAppString(
linphone::Config::newWithFactory(
Paths::getConfigFilePath(mParser->value("config"), false), "")->getString(
QString locale;
string configPath = Paths::getConfigFilePath(mParser->value("config"), false);
if (Paths::filePathExists(configPath)) {
locale = ::Utils::coreStringToAppString(
linphone::Config::newWithFactory(configPath, "")->getString(
SettingsModel::UI_SECTION, "locale", ""
)
);
}
if (!locale.isEmpty() && installLocale(*this, *mTranslator, QLocale(locale))) {
mLocale = locale;