diff --git a/src/modules/welcome/Config.cpp b/src/modules/welcome/Config.cpp index 95e029728..1be331f62 100644 --- a/src/modules/welcome/Config.cpp +++ b/src/modules/welcome/Config.cpp @@ -22,6 +22,7 @@ #include "Settings.h" #include "utils/Logger.h" #include "utils/Retranslator.h" +#include "utils/Variant.h" Config::Config( QObject* parent ) : QObject( parent ) @@ -289,4 +290,14 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) setReleaseNotesUrl( jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) ); setDonateUrl( jobOrBrandingSetting( Branding::DonateUrl, configurationMap, "showDonateUrl" ) ); + + QString language = CalamaresUtils::getString( configurationMap, "languageIcon" ); + if ( !language.isEmpty() ) + { + auto icon = Calamares::Branding::instance()->image( language, QSize( 48, 48 ) ); + if ( !icon.isNull() ) + { + setLanguageIcon( language ); + } + } } diff --git a/src/modules/welcome/WelcomeViewStep.cpp b/src/modules/welcome/WelcomeViewStep.cpp index f6d0a878e..2060286c8 100644 --- a/src/modules/welcome/WelcomeViewStep.cpp +++ b/src/modules/welcome/WelcomeViewStep.cpp @@ -151,12 +151,6 @@ WelcomeViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } } - QString language = CalamaresUtils::getString( configurationMap, "languageIcon" ); - if ( !language.isEmpty() ) - { - m_conf->setLanguageIcon( language ); - } - //here init the qml or qwidgets needed bits m_widget->init(); } diff --git a/src/modules/welcomeq/WelcomeQmlViewStep.cpp b/src/modules/welcomeq/WelcomeQmlViewStep.cpp index ac915e771..cb63a1e03 100644 --- a/src/modules/welcomeq/WelcomeQmlViewStep.cpp +++ b/src/modules/welcomeq/WelcomeQmlViewStep.cpp @@ -144,16 +144,6 @@ WelcomeQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } } - QString language = CalamaresUtils::getString( configurationMap, "languageIcon" ); - if ( !language.isEmpty() ) - { - auto icon = Calamares::Branding::instance()->image( language, QSize( 48, 48 ) ); - if ( !icon.isNull() ) - { - m_config->setLanguageIcon(language); - } - } - Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last setContextProperty( "Welcome", m_config ); }