[welcome] Move languageIcon loading into the Config object
- The QML module had an additional check that the normal one did not; add it in the merged code.
This commit is contained in:
parent
a7a6c937ea
commit
6434374bf3
@ -22,6 +22,7 @@
|
|||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/Retranslator.h"
|
#include "utils/Retranslator.h"
|
||||||
|
#include "utils/Variant.h"
|
||||||
|
|
||||||
Config::Config( QObject* parent )
|
Config::Config( QObject* parent )
|
||||||
: QObject( parent )
|
: QObject( parent )
|
||||||
@ -289,4 +290,14 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
setReleaseNotesUrl(
|
setReleaseNotesUrl(
|
||||||
jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) );
|
jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) );
|
||||||
setDonateUrl( jobOrBrandingSetting( Branding::DonateUrl, configurationMap, "showDonateUrl" ) );
|
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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
//here init the qml or qwidgets needed bits
|
||||||
m_widget->init();
|
m_widget->init();
|
||||||
}
|
}
|
||||||
|
@ -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
|
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
|
||||||
setContextProperty( "Welcome", m_config );
|
setContextProperty( "Welcome", m_config );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user