Clean up a bit.
This commit is contained in:
parent
6db6dc0e08
commit
f31a45e53a
@ -442,10 +442,23 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
|||||||
watcher->deleteLater();
|
watcher->deleteLater();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
auto doReplace = [ this, current ]
|
QFuture< void > future = QtConcurrent::run( this, &ChoicePage::doReplaceSelectedPartition, current );
|
||||||
|
watcher->setFuture( future );
|
||||||
|
} );
|
||||||
|
break;
|
||||||
|
case NoChoice:
|
||||||
|
case Manual:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
updateActionChoicePreview( currentChoice() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
||||||
{
|
{
|
||||||
cDebug() << "begin doReplace";
|
cDebug() << "begin doReplace";
|
||||||
QMutexLocker( &( ChoicePage::m_coreMutex ) );
|
QMutexLocker locker( &m_coreMutex );
|
||||||
|
|
||||||
if ( m_core->isDirty() )
|
if ( m_core->isDirty() )
|
||||||
{
|
{
|
||||||
@ -461,17 +474,6 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
|||||||
selectedDevice(),
|
selectedDevice(),
|
||||||
partition );
|
partition );
|
||||||
cDebug() << "end doReplace";
|
cDebug() << "end doReplace";
|
||||||
};
|
|
||||||
|
|
||||||
QFuture< void > future = QtConcurrent::run( doReplace );
|
|
||||||
watcher->setFuture( future );
|
|
||||||
} );
|
|
||||||
break;
|
|
||||||
case NoChoice:
|
|
||||||
case Manual:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
updateActionChoicePreview( currentChoice() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ private:
|
|||||||
ExpandableRadioButton* createEraseButton();
|
ExpandableRadioButton* createEraseButton();
|
||||||
Device* selectedDevice();
|
Device* selectedDevice();
|
||||||
void applyDeviceChoice();
|
void applyDeviceChoice();
|
||||||
|
void doReplaceSelectedPartition( const QModelIndex& current );
|
||||||
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