feat: add dryRun to copy operation

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2022-10-22 23:36:47 +02:00
parent e048bce13e
commit 15aaff7c1c
3 changed files with 23 additions and 9 deletions

View File

@ -28,7 +28,9 @@ void InstanceCopyTask::executeTask()
FS::copy folderCopy(m_origInstance->instanceRoot(), m_stagingPath);
folderCopy.followSymlinks(false).matcher(m_matcher.get());
m_copyFuture = QtConcurrent::run(QThreadPool::globalInstance(), folderCopy);
m_copyFuture = QtConcurrent::run(QThreadPool::globalInstance(), [&folderCopy]{
return folderCopy();
});
connect(&m_copyFutureWatcher, &QFutureWatcher<bool>::finished, this, &InstanceCopyTask::copyFinished);
connect(&m_copyFutureWatcher, &QFutureWatcher<bool>::canceled, this, &InstanceCopyTask::copyAborted);
m_copyFutureWatcher.setFuture(m_copyFuture);