[welcome] Order member pointers

- Create config before the page
- .. and in doing so, create the page in the initializer list instead
This commit is contained in:
Adriaan de Groot 2020-05-12 14:54:18 +02:00
parent e930c74e85
commit 9e0aa76375
2 changed files with 3 additions and 5 deletions

View File

@ -32,16 +32,14 @@ CALAMARES_PLUGIN_FACTORY_DEFINITION( WelcomeViewStepFactory, registerPlugin< Wel
WelcomeViewStep::WelcomeViewStep( QObject* parent )
: Calamares::ViewStep( parent )
, m_requirementsChecker( new GeneralRequirements( this ) )
, m_conf( new Config( this ) )
, m_widget( new WelcomePage( m_conf ) )
, m_requirementsChecker( new GeneralRequirements( this ) )
{
connect( Calamares::ModuleManager::instance(),
&Calamares::ModuleManager::requirementsComplete,
this,
&WelcomeViewStep::nextStatusChanged );
// the instance of the qqc2 or qwidgets page
m_widget = new WelcomePage( m_conf );
connect( m_conf, &Config::localeIndexChanged, m_widget, &WelcomePage::externallySelectedLanguage );
}

View File

@ -73,9 +73,9 @@ public:
Calamares::RequirementsList checkRequirements() override;
private:
Config* m_conf;
WelcomePage* m_widget;
GeneralRequirements* m_requirementsChecker;
Config* m_conf;
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( WelcomeViewStepFactory )