Use it in ChoicePage.
This commit is contained in:
parent
e1140b6fa8
commit
093c7b042d
@ -434,21 +434,14 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
|||||||
connect( m_beforePartitionBarsView->selectionModel(), &QItemSelectionModel::currentRowChanged,
|
connect( m_beforePartitionBarsView->selectionModel(), &QItemSelectionModel::currentRowChanged,
|
||||||
this, [ this ]( const QModelIndex& current, const QModelIndex& previous )
|
this, [ this ]( const QModelIndex& current, const QModelIndex& previous )
|
||||||
{
|
{
|
||||||
ScanningDialog* rescanningDialog =
|
ScanningDialog::run( QtConcurrent::run( this,
|
||||||
new ScanningDialog( tr( "Scanning storage devices..." ), this );
|
&ChoicePage::doReplaceSelectedPartition,
|
||||||
rescanningDialog->show();
|
current ),
|
||||||
|
tr( "Scanning storage devices..." ),
|
||||||
QFutureWatcher< void >* watcher = new QFutureWatcher< void >();
|
tr( "%1 Partitioning" )
|
||||||
connect( watcher, &QFutureWatcher< void >::finished,
|
.arg( Calamares::Branding::instance()->
|
||||||
this, [ watcher, rescanningDialog ]
|
string( Calamares::Branding::ShortProductName ) ),
|
||||||
{
|
this );
|
||||||
watcher->deleteLater();
|
|
||||||
rescanningDialog->hide();
|
|
||||||
rescanningDialog->deleteLater();
|
|
||||||
} );
|
|
||||||
|
|
||||||
QFuture< void > future = QtConcurrent::run( this, &ChoicePage::doReplaceSelectedPartition, current );
|
|
||||||
watcher->setFuture( future );
|
|
||||||
} );
|
} );
|
||||||
break;
|
break;
|
||||||
case NoChoice:
|
case NoChoice:
|
||||||
|
Loading…
Reference in New Issue
Block a user