mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 02:45:37 -04:00
Clean up a bit.
This commit is contained in:
parent
6db6dc0e08
commit
f31a45e53a
2 changed files with 25 additions and 22 deletions
|
@ -442,10 +442,23 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
|||
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";
|
||||
QMutexLocker( &( ChoicePage::m_coreMutex ) );
|
||||
QMutexLocker locker( &m_coreMutex );
|
||||
|
||||
if ( m_core->isDirty() )
|
||||
{
|
||||
|
@ -461,17 +474,6 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
|||
selectedDevice(),
|
||||
partition );
|
||||
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();
|
||||
Device* selectedDevice();
|
||||
void applyDeviceChoice();
|
||||
void doReplaceSelectedPartition( const QModelIndex& current );
|
||||
void updateDeviceStatePreview();
|
||||
void applyActionChoice( ChoicePage::Choice choice );
|
||||
void updateActionChoicePreview( ChoicePage::Choice choice );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue