Revert to runtime singal-slot syntax for easy disconnects.
This commit is contained in:
parent
3cb293aa75
commit
296bb412a8
@ -415,6 +415,7 @@ ChoicePage::applyDeviceChoice()
|
|||||||
void
|
void
|
||||||
ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
||||||
{
|
{
|
||||||
|
m_beforePartitionBarsView->disconnect( SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ) );
|
||||||
switch ( choice )
|
switch ( choice )
|
||||||
{
|
{
|
||||||
case Erase:
|
case Erase:
|
||||||
@ -444,8 +445,8 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
|||||||
this );
|
this );
|
||||||
}
|
}
|
||||||
|
|
||||||
connect( m_beforePartitionBarsView->selectionModel(), &QItemSelectionModel::currentRowChanged,
|
connect( m_beforePartitionBarsView->selectionModel(), SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ),
|
||||||
this, &ChoicePage::doReplaceSelectedPartition,
|
this, SLOT( doReplaceSelectedPartition( QModelIndex, QModelIndex ) ),
|
||||||
Qt::UniqueConnection );
|
Qt::UniqueConnection );
|
||||||
break;
|
break;
|
||||||
case NoChoice:
|
case NoChoice:
|
||||||
@ -627,8 +628,6 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
previewSelectionMode = QAbstractItemView::NoSelection;
|
previewSelectionMode = QAbstractItemView::NoSelection;
|
||||||
m_beforePartitionBarsView->disconnect( SIGNAL( clicked() ) );
|
|
||||||
m_beforePartitionLabelsView->disconnect( SIGNAL( clicked() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_beforePartitionBarsView->setSelectionMode( previewSelectionMode );
|
m_beforePartitionBarsView->setSelectionMode( previewSelectionMode );
|
||||||
|
@ -69,6 +69,9 @@ signals:
|
|||||||
void actionChosen();
|
void actionChosen();
|
||||||
void deviceChosen();
|
void deviceChosen();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void doReplaceSelectedPartition( const QModelIndex& current, const QModelIndex& previous );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setNextEnabled( bool enabled );
|
void setNextEnabled( bool enabled );
|
||||||
void setupChoices();
|
void setupChoices();
|
||||||
@ -76,7 +79,6 @@ private:
|
|||||||
ExpandableRadioButton* createEraseButton();
|
ExpandableRadioButton* createEraseButton();
|
||||||
Device* selectedDevice();
|
Device* selectedDevice();
|
||||||
void applyDeviceChoice();
|
void applyDeviceChoice();
|
||||||
void doReplaceSelectedPartition( const QModelIndex& current, const QModelIndex& previous );
|
|
||||||
void updateDeviceStatePreview();
|
void updateDeviceStatePreview();
|
||||||
void applyActionChoice( ChoicePage::Choice choice );
|
void applyActionChoice( ChoicePage::Choice choice );
|
||||||
void updateActionChoicePreview( ChoicePage::Choice choice );
|
void updateActionChoicePreview( ChoicePage::Choice choice );
|
||||||
|
Loading…
Reference in New Issue
Block a user