diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-10-22 23:36:47 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-11-12 20:28:29 +0100 |
commit | 15aaff7c1ce8d709c444d891bf640ee39494d10e (patch) | |
tree | 8a2943a5ac0dc57fc5ec59131907c275c174113d /launcher/InstanceCopyTask.cpp | |
parent | e048bce13ea4bd56ef96ba7a1a4699142d09600a (diff) | |
download | PrismLauncher-15aaff7c1ce8d709c444d891bf640ee39494d10e.tar.gz PrismLauncher-15aaff7c1ce8d709c444d891bf640ee39494d10e.tar.bz2 PrismLauncher-15aaff7c1ce8d709c444d891bf640ee39494d10e.zip |
feat: add dryRun to copy operation
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/InstanceCopyTask.cpp')
-rw-r--r-- | launcher/InstanceCopyTask.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launcher/InstanceCopyTask.cpp b/launcher/InstanceCopyTask.cpp index fb118353..0a83ed9c 100644 --- a/launcher/InstanceCopyTask.cpp +++ b/launcher/InstanceCopyTask.cpp @@ -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); |