From 7d0451fe6924affe41d371b20a21016d3b3aa992 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 12 Sep 2018 10:16:48 -0400 Subject: [PATCH] [partition] Rename Choice -> InstallChoice - There are more choices to be made (or to come) when partitioning, so don't take the most generic term for one enum. --- src/modules/partition/gui/ChoicePage.cpp | 8 ++++---- src/modules/partition/gui/ChoicePage.h | 10 +++++----- src/modules/partition/gui/PartitionViewStep.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 4dd214382..62ee27a7e 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -262,7 +262,7 @@ ChoicePage::setupChoices() { if ( checked ) // An action was picked. { - m_choice = static_cast< Choice >( id ); + m_choice = static_cast< InstallChoice >( id ); updateNextEnabled(); emit actionChosen(); @@ -386,7 +386,7 @@ ChoicePage::continueApplyDeviceChoice() void -ChoicePage::applyActionChoice( ChoicePage::Choice choice ) +ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice ) { m_beforePartitionBarsView->selectionModel()-> disconnect( SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ) ); @@ -901,7 +901,7 @@ ChoicePage::updateDeviceStatePreview() * @param choice the chosen partitioning action. */ void -ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice ) +ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice ) { Device* currentDevice = selectedDevice(); Q_ASSERT( currentDevice ); @@ -1356,7 +1356,7 @@ ChoicePage::isNextEnabled() const } -ChoicePage::Choice +ChoicePage::InstallChoice ChoicePage::currentChoice() const { return m_choice; diff --git a/src/modules/partition/gui/ChoicePage.h b/src/modules/partition/gui/ChoicePage.h index c36747e93..d991e513a 100644 --- a/src/modules/partition/gui/ChoicePage.h +++ b/src/modules/partition/gui/ChoicePage.h @@ -53,7 +53,7 @@ class ChoicePage : public QWidget, private Ui::ChoicePage { Q_OBJECT public: - enum Choice + enum InstallChoice { NoChoice, Alongside, @@ -84,7 +84,7 @@ public: * currently selected partitioning mode (with a PrettyRadioButton). * @return the enum Choice value. */ - Choice currentChoice() const; + InstallChoice currentChoice() const; /** * @brief onLeave runs when control passes from this page to another one. @@ -95,7 +95,7 @@ public: * @brief applyActionChoice reacts to a choice of partitioning mode. * @param choice the partitioning action choice. */ - void applyActionChoice( ChoicePage::Choice choice ); + void applyActionChoice( ChoicePage::InstallChoice choice ); signals: void nextStatusChanged( bool ); @@ -121,7 +121,7 @@ private: void continueApplyDeviceChoice(); // .. called after scan void updateDeviceStatePreview(); - void updateActionChoicePreview( ChoicePage::Choice choice ); + void updateActionChoicePreview( ChoicePage::InstallChoice choice ); void setupActions(); OsproberEntryList getOsproberEntriesForDevice( Device* device ) const; void doAlongsideApply(); @@ -132,7 +132,7 @@ private: QMutex m_previewsMutex; - Choice m_choice; + InstallChoice m_choice; bool m_isEfi; QComboBox* m_drivesCombo; diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index b49b6c93b..6ad1a6c77 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -138,7 +138,7 @@ PartitionViewStep::createSummaryWidget() const widget->setLayout( mainLayout ); mainLayout->setMargin( 0 ); - ChoicePage::Choice choice = m_choicePage->currentChoice(); + ChoicePage::InstallChoice choice = m_choicePage->currentChoice(); QFormLayout* formLayout = new QFormLayout( widget ); const int MARGIN = CalamaresUtils::defaultFontHeight() / 2;