From 4039d8d4dbe35d3897a0ec5ac1ee98d2a87160ae Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 31 Dec 2015 14:14:47 +0100 Subject: [PATCH] Make on-action-select rescan also async. --- src/modules/partition/gui/ChoicePage.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 283b3084a..729316772 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -428,7 +428,12 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice ) case Replace: if ( m_core->isDirty() ) { - m_core->revertDevice( selectedDevice() ); + ScanningDialog::run( QtConcurrent::run( [ = ] + { + QMutexLocker locker( &m_coreMutex ); + m_core->revertDevice( selectedDevice() ); + } ), + this ); } connect( m_beforePartitionBarsView->selectionModel(), &QItemSelectionModel::currentRowChanged, @@ -437,10 +442,6 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice ) ScanningDialog::run( QtConcurrent::run( this, &ChoicePage::doReplaceSelectedPartition, current ), - tr( "Scanning storage devices..." ), - tr( "%1 Partitioning" ) - .arg( Calamares::Branding::instance()-> - string( Calamares::Branding::ShortProductName ) ), this ); } ); break;