[locale] Make the Page use the region model from Config

This commit is contained in:
Adriaan de Groot 2020-07-20 16:27:15 +02:00
parent 88d1d255f6
commit 4d5ff6d5c4
2 changed files with 1 additions and 5 deletions

View File

@ -43,7 +43,6 @@
LocalePage::LocalePage( Config* config, QWidget* parent )
: QWidget( parent )
, m_config( config )
, m_regionModel( std::make_unique< CalamaresUtils::Locale::CStringListModel >( CalamaresUtils::Locale::TZRegion::fromZoneTab() ) )
, m_blockTzWidgetSet( false )
{
QBoxLayout* mainLayout = new QVBoxLayout;
@ -140,7 +139,7 @@ LocalePage::init( const QString& initialRegion, const QString& initialZone )
{
using namespace CalamaresUtils::Locale;
m_regionCombo->setModel( m_regionModel.get() );
m_regionCombo->setModel( m_config->regionModel() );
m_regionCombo->currentIndexChanged( m_regionCombo->currentIndex() );
auto* region = CalamaresUtils::Locale::TZRegion::fromZoneTab().find< TZRegion >( initialRegion );

View File

@ -78,9 +78,6 @@ private:
void changeLocale();
void changeFormats();
// Dynamically, QList< TZRegion* >
std::unique_ptr< CalamaresUtils::Locale::CStringListModel > m_regionModel;
TimeZoneWidget* m_tzWidget;
QComboBox* m_regionCombo;
QComboBox* m_zoneCombo;