[partition] Don't run bool allowManualPartitioning through GS

It's a bit over-wrought to store a bool in a QVariant in GS for
consumption **only** by ChoicePage, so drop that GS key and store
it locally.
main
Adriaan de Groot 4 years ago
parent 5e3a0eda73
commit f494440895

@ -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 static void
fillGSConfigurationEFI( Calamares::GlobalStorage* gs, const QVariantMap& configurationMap ) fillGSConfigurationEFI( Calamares::GlobalStorage* gs, const QVariantMap& configurationMap )
{ {
@ -272,9 +264,7 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
} }
setSwapChoice( m_initialSwapChoice ); setSwapChoice( m_initialSwapChoice );
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); m_allowManualPartitioning = CalamaresUtils::getBool( configurationMap, "allowManualPartitioning", true );
gs->insert( "allowManualPartitioning",
CalamaresUtils::getBool( configurationMap, "allowManualPartitioning", true ) );
if ( configurationMap.contains( "availableFileSystemTypes" ) ) 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" ); m_requiredPartitionTableType = CalamaresUtils::getStringList( configurationMap, "requiredPartitionTableType" );
gs->insert( "requiredPartitionTableType", m_requiredPartitionTableType ); gs->insert( "requiredPartitionTableType", m_requiredPartitionTableType );

@ -112,9 +112,8 @@ public:
QString eraseFsType() const { return m_eraseFsTypeChoice; } QString eraseFsType() const { return m_eraseFsTypeChoice; }
///@brief Is manual partitioning allowed (not explicitly disabled in the config file)?
///@brief Is manual partitioning allowed (not explicitly disnabled in the config file)? bool allowManualPartitioning() const { return m_allowManualPartitioning; }
bool allowManualPartitioning() const;
public Q_SLOTS: public Q_SLOTS:
void setInstallChoice( int ); ///< Translates a button ID or so to InstallChoice void setInstallChoice( int ); ///< Translates a button ID or so to InstallChoice
@ -138,6 +137,8 @@ private:
InstallChoice m_installChoice = NoChoice; InstallChoice m_installChoice = NoChoice;
qreal m_requiredStorageGiB = 0.0; // May duplicate setting in the welcome module qreal m_requiredStorageGiB = 0.0; // May duplicate setting in the welcome module
QStringList m_requiredPartitionTableType; QStringList m_requiredPartitionTableType;
bool m_allowManualPartitioning = true;
}; };
/** @brief Given a set of swap choices, return a sensible value from it. /** @brief Given a set of swap choices, return a sensible value from it.

Loading…
Cancel
Save