From 9e0aa76375118ff9832f2c1f62393fd2f1789425 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 12 May 2020 14:54:18 +0200 Subject: [PATCH] [welcome] Order member pointers - Create config before the page - .. and in doing so, create the page in the initializer list instead --- src/modules/welcome/WelcomeViewStep.cpp | 6 ++---- src/modules/welcome/WelcomeViewStep.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/modules/welcome/WelcomeViewStep.cpp b/src/modules/welcome/WelcomeViewStep.cpp index 0ed887fa9..cad5349a9 100644 --- a/src/modules/welcome/WelcomeViewStep.cpp +++ b/src/modules/welcome/WelcomeViewStep.cpp @@ -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 ); } diff --git a/src/modules/welcome/WelcomeViewStep.h b/src/modules/welcome/WelcomeViewStep.h index 3265395fc..f4874dc16 100644 --- a/src/modules/welcome/WelcomeViewStep.h +++ b/src/modules/welcome/WelcomeViewStep.h @@ -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 )