[locale] Drop LocalePage:;init
- setting the initial location is something the Config-object should do - setting up the combo-boxes can be done in the constructor
This commit is contained in:
parent
726f882185
commit
98f912f80a
@ -115,6 +115,10 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
|
||||
connect( m_formatsChangeButton, &QPushButton::clicked, this, &LocalePage::changeFormats );
|
||||
|
||||
CALAMARES_RETRANSLATE_SLOT( &LocalePage::updateLocaleLabels )
|
||||
|
||||
m_regionCombo->setModel( m_config->regionModel() );
|
||||
m_regionCombo->currentIndexChanged( m_regionCombo->currentIndex() );
|
||||
updateGlobalStorage();
|
||||
}
|
||||
|
||||
|
||||
@ -136,19 +140,6 @@ LocalePage::updateLocaleLabels()
|
||||
m_formatsLabel->setText( labels.second );
|
||||
}
|
||||
|
||||
void
|
||||
LocalePage::init( const QString& initialRegion, const QString& initialZone )
|
||||
{
|
||||
using namespace CalamaresUtils::Locale;
|
||||
|
||||
m_regionCombo->setModel( m_config->regionModel() );
|
||||
m_regionCombo->currentIndexChanged( m_regionCombo->currentIndex() );
|
||||
|
||||
m_config->setCurrentLocation( initialRegion, initialZone );
|
||||
|
||||
updateGlobalStorage();
|
||||
}
|
||||
|
||||
std::pair< QString, QString >
|
||||
LocalePage::prettyLocaleStatus( const LocaleConfiguration& lc ) const
|
||||
{
|
||||
|
@ -43,8 +43,6 @@ public:
|
||||
explicit LocalePage( class Config* config, QWidget* parent = nullptr );
|
||||
virtual ~LocalePage();
|
||||
|
||||
void init( const QString& initialRegion, const QString& initialZone );
|
||||
|
||||
QString prettyStatus() const;
|
||||
|
||||
QMap< QString, QString > localesMap();
|
||||
|
@ -70,7 +70,7 @@ LocaleViewStep::setUpPage()
|
||||
{
|
||||
m_actualWidget = new LocalePage( m_config.get() );
|
||||
}
|
||||
m_actualWidget->init( m_startingTimezone.first, m_startingTimezone.second );
|
||||
m_config->setCurrentLocation( m_startingTimezone.first, m_startingTimezone.second );
|
||||
m_widget->layout()->addWidget( m_actualWidget );
|
||||
|
||||
ensureSize( m_actualWidget->sizeHint() );
|
||||
|
Loading…
Reference in New Issue
Block a user