From 15aaff7c1ce8d709c444d891bf640ee39494d10e Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sat, 22 Oct 2022 23:36:47 +0200 Subject: feat: add dryRun to copy operation Signed-off-by: Sefa Eyeoglu --- launcher/InstanceCopyTask.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'launcher/InstanceCopyTask.cpp') 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::finished, this, &InstanceCopyTask::copyFinished); connect(&m_copyFutureWatcher, &QFutureWatcher::canceled, this, &InstanceCopyTask::copyAborted); m_copyFutureWatcher.setFuture(m_copyFuture); -- cgit