diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 2ce982802..283b3084a 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -434,21 +434,14 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice ) connect( m_beforePartitionBarsView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, [ this ]( const QModelIndex& current, const QModelIndex& previous ) { - ScanningDialog* rescanningDialog = - new ScanningDialog( tr( "Scanning storage devices..." ), this ); - rescanningDialog->show(); - - QFutureWatcher< void >* watcher = new QFutureWatcher< void >(); - connect( watcher, &QFutureWatcher< void >::finished, - this, [ watcher, rescanningDialog ] - { - watcher->deleteLater(); - rescanningDialog->hide(); - rescanningDialog->deleteLater(); - } ); - - QFuture< void > future = QtConcurrent::run( this, &ChoicePage::doReplaceSelectedPartition, current ); - watcher->setFuture( future ); + 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; case NoChoice: