Commit f9c4eb12 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(App): when app is restarted, update language if necessary

parent e1b11522
......@@ -142,6 +142,8 @@ inline void activeSplashScreen (QQmlApplicationEngine *engine) {
}
void App::initContentApp () {
shared_ptr<linphone::Config> config = ::getConfigIfExists(*mParser);
// Destroy qml components and linphone core if necessary.
if (mEngine) {
qInfo() << QStringLiteral("Restarting app...");
......@@ -151,6 +153,8 @@ void App::initContentApp () {
mSettingsWindow = nullptr;
CoreManager::uninit();
initLocale(config);
} else {
// Don't quit if last window is closed!!!
setQuitOnLastWindowClosed(false);
......@@ -185,7 +189,7 @@ void App::initContentApp () {
mEngine->addImageProvider(ThumbnailProvider::PROVIDER_ID, new ThumbnailProvider());
mColors = new Colors(this);
mColors->useConfig(::getConfigIfExists(*mParser));
mColors->useConfig(config);
registerTypes();
registerSharedTypes();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment