mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-25 19:35:44 -05:00
Maybe a plain QTimer is enough.
This commit is contained in:
parent
cd8b7619d0
commit
d635709833
1 changed files with 6 additions and 8 deletions
|
@ -49,8 +49,7 @@
|
|||
#include <QStandardItemModel>
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
#include <QFutureWatcher>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
#include <QTimer>
|
||||
|
||||
static bool
|
||||
hasRootPartition( Device* device )
|
||||
|
@ -532,12 +531,11 @@ PartitionCoreModule::revertDevice( Device* dev )
|
|||
void
|
||||
PartitionCoreModule::asyncRevertDevice( Device* dev, std::function< void() > callback )
|
||||
{
|
||||
QFutureWatcher< void > watcher;
|
||||
connect( &watcher, &QFutureWatcher< void >::finished,
|
||||
callback );
|
||||
|
||||
QFuture< void > future = QtConcurrent::run( this, &PartitionCoreModule::revertDevice, dev );
|
||||
watcher.setFuture( future );
|
||||
QTimer::singleShot( 0, this, [=]
|
||||
{
|
||||
revertDevice( dev );
|
||||
QTimer::singleShot( 0, callback );
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue