From 8dbb3217e3102c54dbadb634648ca8ecd9f85cc4 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 14 Jun 2017 13:49:00 +0200 Subject: [PATCH] Really fix config file migration not being done. --- linphone-desktop/src/app/App.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/linphone-desktop/src/app/App.cpp b/linphone-desktop/src/app/App.cpp index b19736ea5..0d2a0953f 100644 --- a/linphone-desktop/src/app/App.cpp +++ b/linphone-desktop/src/app/App.cpp @@ -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;