| 29 | } |
| 30 | |
| 31 | void PackInstallTask::executeTask() { |
| 32 | FS::copy folderCopy(m_pack.instanceDir, FS::PathCombine(m_stagingPath, ".minecraft")); |
| 33 | folderCopy.followSymlinks(true).blacklist(new RegexpMatcher("(instance|version)[.]json")); |
| 34 | |
| 35 | m_copyFuture = QtConcurrent::run(QThreadPool::globalInstance(), folderCopy); |
| 36 | connect(&m_copyFutureWatcher, &QFutureWatcher<bool>::finished, this, &PackInstallTask::copyFinished); |
| 37 | connect(&m_copyFutureWatcher, &QFutureWatcher<bool>::canceled, this, &PackInstallTask::copyAborted); |
| 38 | m_copyFutureWatcher.setFuture(m_copyFuture); |
| 39 | abortable = true; |
| 40 | } |
| 41 | |
| 42 | void PackInstallTask::copyFinished() { |
| 43 | abortable = false; |
nothing calls this directly
no test coverage detected