From 634a53d27a14dd23bf38a120413fa86618b641e2 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 3 Sep 2020 20:20:05 +0200 Subject: [PATCH] [locale] Use new convenience function for updating localeConf --- src/modules/locale/Config.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/modules/locale/Config.cpp b/src/modules/locale/Config.cpp index 37857cc71..1417e5b89 100644 --- a/src/modules/locale/Config.cpp +++ b/src/modules/locale/Config.cpp @@ -14,6 +14,7 @@ #include "GlobalStorage.h" #include "JobQueue.h" #include "Settings.h" +#include "locale/Global.h" #include "locale/Label.h" #include "modulesystem/ModuleManager.h" #include "network/Manager.h" @@ -167,13 +168,7 @@ updateGSLocation( Calamares::GlobalStorage* gs, const CalamaresUtils::Locale::Ti static void updateGSLocale( Calamares::GlobalStorage* gs, const LocaleConfiguration& locale ) { - auto map = locale.toMap(); - QVariantMap vm; - for ( auto it = map.constBegin(); it != map.constEnd(); ++it ) - { - vm.insert( it.key(), it.value() ); - } - gs->insert( "localeConf", vm ); + CalamaresUtils::Locale::insertGS( *gs, locale.toMap(), CalamaresUtils::Locale::InsertMode::Overwrite ); } Config::Config( QObject* parent )