MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / executeTask

Method executeTask

launcher/InstanceCopyTask.cpp:22–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void InstanceCopyTask::executeTask()
23{
24 setStatus(tr("Copying instance %1").arg(m_origInstance->name()));
25
26 FS::copy folderCopy(m_origInstance->instanceRoot(), m_stagingPath);
27 folderCopy.followSymlinks(false).blacklist(m_matcher.get());
28
29 m_copyFuture = QtConcurrent::run(QThreadPool::globalInstance(), folderCopy);
30 connect(&m_copyFutureWatcher, &QFutureWatcher<bool>::finished, this, &InstanceCopyTask::copyFinished);
31 connect(&m_copyFutureWatcher, &QFutureWatcher<bool>::canceled, this, &InstanceCopyTask::copyAborted);
32 m_copyFutureWatcher.setFuture(m_copyFuture);
33}
34
35void InstanceCopyTask::copyFinished()
36{

Callers

nothing calls this directly

Calls 4

runFunction · 0.85
instanceRootMethod · 0.80
nameMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected