Asynchronous rescan on device change.
This commit is contained in:
parent
877fa98ea6
commit
b17b7a9c89
@ -306,12 +306,29 @@ ChoicePage::applyDeviceChoice()
|
|||||||
|
|
||||||
if ( m_core->isDirty() )
|
if ( m_core->isDirty() )
|
||||||
{
|
{
|
||||||
m_core->revertAllDevices();
|
ScanningDialog::run( QtConcurrent::run( [ = ]
|
||||||
|
{
|
||||||
|
QMutexLocker locker( &m_coreMutex );
|
||||||
|
m_core->revertAllDevices();
|
||||||
|
} ),
|
||||||
|
[ this ]
|
||||||
|
{
|
||||||
|
continueApplyDeviceChoice();
|
||||||
|
},
|
||||||
|
this );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continueApplyDeviceChoice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
ChoicePage::continueApplyDeviceChoice()
|
||||||
|
{
|
||||||
Device* currd = selectedDevice();
|
Device* currd = selectedDevice();
|
||||||
|
|
||||||
|
|
||||||
// The device should only be nullptr immediately after a PCM reset.
|
// The device should only be nullptr immediately after a PCM reset.
|
||||||
// applyDeviceChoice() will be called again momentarily as soon as we handle the
|
// applyDeviceChoice() will be called again momentarily as soon as we handle the
|
||||||
// PartitionCoreModule::reverted signal.
|
// PartitionCoreModule::reverted signal.
|
||||||
|
@ -81,6 +81,7 @@ private:
|
|||||||
QComboBox* createBootloaderComboBox( QWidget* parentButton );
|
QComboBox* createBootloaderComboBox( QWidget* parentButton );
|
||||||
Device* selectedDevice();
|
Device* selectedDevice();
|
||||||
void applyDeviceChoice();
|
void applyDeviceChoice();
|
||||||
|
void continueApplyDeviceChoice();
|
||||||
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