Clean up a bit.

main
Teo Mrnjavac 9 years ago
parent 6db6dc0e08
commit f31a45e53a

@ -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…
Cancel
Save