diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 4f58e722c..6049df525 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -415,6 +415,7 @@ ChoicePage::applyDeviceChoice() void ChoicePage::applyActionChoice( ChoicePage::Choice choice ) { + m_beforePartitionBarsView->disconnect( SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ) ); switch ( choice ) { case Erase: @@ -444,8 +445,8 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice ) this ); } - connect( m_beforePartitionBarsView->selectionModel(), &QItemSelectionModel::currentRowChanged, - this, &ChoicePage::doReplaceSelectedPartition, + connect( m_beforePartitionBarsView->selectionModel(), SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ), + this, SLOT( doReplaceSelectedPartition( QModelIndex, QModelIndex ) ), Qt::UniqueConnection ); break; case NoChoice: @@ -627,8 +628,6 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice ) break; default: previewSelectionMode = QAbstractItemView::NoSelection; - m_beforePartitionBarsView->disconnect( SIGNAL( clicked() ) ); - m_beforePartitionLabelsView->disconnect( SIGNAL( clicked() ) ); } m_beforePartitionBarsView->setSelectionMode( previewSelectionMode ); diff --git a/src/modules/partition/gui/ChoicePage.h b/src/modules/partition/gui/ChoicePage.h index 3db331bde..5365d0fb9 100644 --- a/src/modules/partition/gui/ChoicePage.h +++ b/src/modules/partition/gui/ChoicePage.h @@ -69,6 +69,9 @@ signals: void actionChosen(); void deviceChosen(); +private slots: + void doReplaceSelectedPartition( const QModelIndex& current, const QModelIndex& previous ); + private: void setNextEnabled( bool enabled ); void setupChoices(); @@ -76,7 +79,6 @@ private: ExpandableRadioButton* createEraseButton(); Device* selectedDevice(); void applyDeviceChoice(); - void doReplaceSelectedPartition( const QModelIndex& current, const QModelIndex& previous ); void updateDeviceStatePreview(); void applyActionChoice( ChoicePage::Choice choice ); void updateActionChoicePreview( ChoicePage::Choice choice );