Don't allow to go next if the timezone view hasn't loaded.
This commit is contained in:
parent
f9aa532d77
commit
81eafced2f
@ -31,6 +31,7 @@ LocaleViewStep::LocaleViewStep( QObject* parent )
|
||||
: Calamares::ViewStep( parent )
|
||||
, m_widget( new QWidget() )
|
||||
, m_actualWidget( new LocalePage() )
|
||||
, m_nextEnabled( false )
|
||||
{
|
||||
QBoxLayout* mainLayout = new QHBoxLayout;
|
||||
m_widget->setLayout( mainLayout );
|
||||
@ -47,12 +48,14 @@ LocaleViewStep::LocaleViewStep( QObject* parent )
|
||||
m_widget->layout()->removeWidget( waitingLabel );
|
||||
waitingLabel->deleteLater();
|
||||
m_widget->layout()->addWidget( m_actualWidget );
|
||||
m_nextEnabled = true;
|
||||
emit nextStatusChanged( m_nextEnabled );
|
||||
});
|
||||
|
||||
QFuture< void > initFuture = QtConcurrent::run( LocaleGlobal::init );
|
||||
m_initWatcher.setFuture( initFuture );
|
||||
|
||||
emit nextStatusChanged( true );
|
||||
emit nextStatusChanged( m_nextEnabled );
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +96,7 @@ LocaleViewStep::back()
|
||||
bool
|
||||
LocaleViewStep::isNextEnabled() const
|
||||
{
|
||||
return true;
|
||||
return m_nextEnabled;
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,6 +56,7 @@ private:
|
||||
QFutureWatcher< void > m_initWatcher;
|
||||
|
||||
LocalePage* m_actualWidget;
|
||||
bool m_nextEnabled;
|
||||
};
|
||||
|
||||
#endif // LOCALEVIEWSTEP_H
|
||||
|
Loading…
Reference in New Issue
Block a user