Use ScanningDialog in replace operation.

main
Teo Mrnjavac 10 years ago
parent 035370705a
commit d28946040f

@ -31,6 +31,7 @@
#include "PartitionBarsView.h" #include "PartitionBarsView.h"
#include "PartitionLabelsView.h" #include "PartitionLabelsView.h"
#include "DeviceInfoWidget.h" #include "DeviceInfoWidget.h"
#include "ScanningDialog.h"
#include "utils/CalamaresUtilsGui.h" #include "utils/CalamaresUtilsGui.h"
#include "utils/Logger.h" #include "utils/Logger.h"
@ -433,11 +434,17 @@ 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 =
new ScanningDialog( tr( "Scanning storage devices..." ), this );
rescanningDialog->show();
QFutureWatcher< void >* watcher = new QFutureWatcher< void >(); QFutureWatcher< void >* watcher = new QFutureWatcher< void >();
connect( watcher, &QFutureWatcher< void >::finished, connect( watcher, &QFutureWatcher< void >::finished,
this, [ watcher ] this, [ watcher, rescanningDialog ]
{ {
watcher->deleteLater(); watcher->deleteLater();
rescanningDialog->hide();
rescanningDialog->deleteLater();
} ); } );
QFuture< void > future = QtConcurrent::run( this, &ChoicePage::doReplaceSelectedPartition, current ); QFuture< void > future = QtConcurrent::run( this, &ChoicePage::doReplaceSelectedPartition, current );

Loading…
Cancel
Save