From b5882a75d1d6eb4d40b36b84c0df63b7421acc7a Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Wed, 13 Jan 2016 17:50:05 +0100 Subject: [PATCH] AlongsidePage is not used any more. --- .../partition/gui/PartitionViewStep.cpp | 26 +++++-------------- src/modules/partition/gui/PartitionViewStep.h | 2 -- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 2ccc19bfb..f6921b415 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -26,7 +26,6 @@ #include "core/OsproberEntry.h" #include "core/PartUtils.h" #include "gui/ChoicePage.h" -#include "gui/AlongsidePage.h" #include "gui/PartitionPage.h" #include "gui/PartitionBarsView.h" #include "gui/PartitionLabelsView.h" @@ -57,7 +56,6 @@ PartitionViewStep::PartitionViewStep( QObject* parent ) , m_widget( new QStackedWidget() ) , m_core( new PartitionCoreModule( this ) ) , m_choicePage( nullptr ) - , m_alongsidePage( new AlongsidePage() ) , m_manualPartitionPage( new PartitionPage( m_core ) ) , m_compactMode( true ) { @@ -78,11 +76,9 @@ PartitionViewStep::continueLoading() m_choicePage = new ChoicePage(); m_choicePage->init( m_core ); - m_alongsidePage->init( m_core ); m_widget->addWidget( m_choicePage ); m_widget->addWidget( m_manualPartitionPage ); - m_widget->addWidget( m_alongsidePage ); m_widget->removeWidget( m_waitingWidget ); m_waitingWidget->deleteLater(); m_waitingWidget = nullptr; @@ -91,8 +87,6 @@ PartitionViewStep::continueLoading() this, &PartitionViewStep::nextStatusChanged ); connect( m_choicePage, &ChoicePage::nextStatusChanged, this, &PartitionViewStep::nextStatusChanged ); - connect( m_alongsidePage, &AlongsidePage::nextStatusChanged, - this, &PartitionViewStep::nextStatusChanged ); } @@ -276,9 +270,9 @@ PartitionViewStep::next() } else if ( m_choicePage->currentChoice() == ChoicePage::Alongside ) { - if ( m_core->isDirty() ) - m_core->revert(); - m_widget->setCurrentWidget( m_alongsidePage ); + m_choicePage->doAlongsideApply(); + emit done(); + return; } else if ( m_choicePage->currentChoice() == ChoicePage::Replace ) { @@ -306,9 +300,6 @@ PartitionViewStep::isNextEnabled() const if ( m_choicePage && m_choicePage == m_widget->currentWidget() ) return m_choicePage->isNextEnabled(); - if ( m_alongsidePage && m_alongsidePage == m_widget->currentWidget() ) - return m_alongsidePage->isNextEnabled(); - if ( m_manualPartitionPage && m_manualPartitionPage == m_widget->currentWidget() ) return m_core->hasRootMountPoint(); @@ -326,8 +317,7 @@ PartitionViewStep::isBackEnabled() const bool PartitionViewStep::isAtBeginning() const { - if ( m_widget->currentWidget() == m_manualPartitionPage || - m_widget->currentWidget() == m_alongsidePage ) + if ( m_widget->currentWidget() == m_manualPartitionPage ) return false; return true; } @@ -339,7 +329,8 @@ PartitionViewStep::isAtEnd() const if ( m_choicePage == m_widget->currentWidget() ) { if ( m_choicePage->currentChoice() == ChoicePage::Erase || - m_choicePage->currentChoice() == ChoicePage::Replace ) + m_choicePage->currentChoice() == ChoicePage::Replace || + m_choicePage->currentChoice() == ChoicePage::Alongside ) return true; return false; } @@ -362,10 +353,7 @@ PartitionViewStep::onActivate() void PartitionViewStep::onLeave() { - if ( m_widget->currentWidget() == m_alongsidePage ) - { - m_alongsidePage->applyChanges(); - } + } diff --git a/src/modules/partition/gui/PartitionViewStep.h b/src/modules/partition/gui/PartitionViewStep.h index df9568452..f69361961 100644 --- a/src/modules/partition/gui/PartitionViewStep.h +++ b/src/modules/partition/gui/PartitionViewStep.h @@ -28,7 +28,6 @@ #include class ChoicePage; -class AlongsidePage; class PartitionPage; class PartitionCoreModule; class QStackedWidget; @@ -72,7 +71,6 @@ private: PartitionCoreModule* m_core; QStackedWidget* m_widget; ChoicePage* m_choicePage; - AlongsidePage* m_alongsidePage; PartitionPage* m_manualPartitionPage; QWidget* m_waitingWidget;