From 5e3a0eda7315be86a97729cace504a2fe6862103 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 29 Jun 2021 13:01:21 +0200 Subject: [PATCH] [partition] Reduce confused naming --- src/modules/packagechooser/Config.h | 2 +- src/modules/partition/Config.cpp | 2 +- src/modules/partition/Config.h | 11 ++++++++++- src/modules/partition/PartitionViewStep.cpp | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/modules/packagechooser/Config.h b/src/modules/packagechooser/Config.h index 4cb545cb8..5959e3ea4 100644 --- a/src/modules/packagechooser/Config.h +++ b/src/modules/packagechooser/Config.h @@ -72,7 +72,7 @@ public: */ void updateGlobalStorage( const QStringList& selected ) const; /// As updateGlobalStorage() with an empty selection list - void updateGlobalStorage() const { updateGlobalStorage( QStringList() ); } + void fillGSSecondaryConfiguration() const { updateGlobalStorage( QStringList() ); } private: PackageListModel* m_model = nullptr; diff --git a/src/modules/partition/Config.cpp b/src/modules/partition/Config.cpp index 7de7dbbe3..a47bf90f8 100644 --- a/src/modules/partition/Config.cpp +++ b/src/modules/partition/Config.cpp @@ -295,7 +295,7 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) } void -Config::updateGlobalStorage() const +Config::fillGSSecondaryConfiguration() const { // If there's no setting (e.g. from the welcome page) for required storage // then use ours, if it was set. diff --git a/src/modules/partition/Config.h b/src/modules/partition/Config.h index 8b420a8d0..826cc73b5 100644 --- a/src/modules/partition/Config.h +++ b/src/modules/partition/Config.h @@ -60,7 +60,16 @@ public: using EraseFsTypesSet = QStringList; void setConfigurationMap( const QVariantMap& ); - void updateGlobalStorage() const; + /** @brief Set GS values where other modules configuration has priority + * + * Some "required" values are duplicated between modules; if some + * othe module hasn't already set the GS value, take a value from + * the partitioning configuration. + * + * Applicable GS keys: + * - requiredStorageGiB + */ + void fillGSSecondaryConfiguration() const; /** @brief What kind of installation (partitioning) is requested **initially**? * diff --git a/src/modules/partition/PartitionViewStep.cpp b/src/modules/partition/PartitionViewStep.cpp index cea1df023..47315e6a0 100644 --- a/src/modules/partition/PartitionViewStep.cpp +++ b/src/modules/partition/PartitionViewStep.cpp @@ -368,7 +368,7 @@ PartitionViewStep::isAtEnd() const void PartitionViewStep::onActivate() { - m_config->updateGlobalStorage(); + m_config->fillGSSecondaryConfiguration(); // if we're coming back to PVS from the next VS if ( m_widget->currentWidget() == m_choicePage && m_config->installChoice() == Config::InstallChoice::Alongside )