diff --git a/src/modules/partition/Config.cpp b/src/modules/partition/Config.cpp index a47bf90f8..deb75d2a4 100644 --- a/src/modules/partition/Config.cpp +++ b/src/modules/partition/Config.cpp @@ -220,14 +220,6 @@ Config::setEraseFsTypeChoice( const QString& choice ) } } - -bool -Config::allowManualPartitioning() const -{ - Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - return gs->value( "allowManualPartitioning" ).toBool(); -} - static void fillGSConfigurationEFI( Calamares::GlobalStorage* gs, const QVariantMap& configurationMap ) { @@ -272,9 +264,7 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) } setSwapChoice( m_initialSwapChoice ); - Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - gs->insert( "allowManualPartitioning", - CalamaresUtils::getBool( configurationMap, "allowManualPartitioning", true ) ); + m_allowManualPartitioning = CalamaresUtils::getBool( configurationMap, "allowManualPartitioning", true ); if ( configurationMap.contains( "availableFileSystemTypes" ) ) { @@ -288,6 +278,7 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) } } + Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); m_requiredPartitionTableType = CalamaresUtils::getStringList( configurationMap, "requiredPartitionTableType" ); gs->insert( "requiredPartitionTableType", m_requiredPartitionTableType ); diff --git a/src/modules/partition/Config.h b/src/modules/partition/Config.h index 826cc73b5..309bb4a49 100644 --- a/src/modules/partition/Config.h +++ b/src/modules/partition/Config.h @@ -112,9 +112,8 @@ public: QString eraseFsType() const { return m_eraseFsTypeChoice; } - - ///@brief Is manual partitioning allowed (not explicitly disnabled in the config file)? - bool allowManualPartitioning() const; + ///@brief Is manual partitioning allowed (not explicitly disabled in the config file)? + bool allowManualPartitioning() const { return m_allowManualPartitioning; } public Q_SLOTS: void setInstallChoice( int ); ///< Translates a button ID or so to InstallChoice @@ -138,6 +137,8 @@ private: InstallChoice m_installChoice = NoChoice; qreal m_requiredStorageGiB = 0.0; // May duplicate setting in the welcome module QStringList m_requiredPartitionTableType; + + bool m_allowManualPartitioning = true; }; /** @brief Given a set of swap choices, return a sensible value from it.