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

Method executeTask

launcher/modplatform/technic/SingleZipPackInstallTask.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void Technic::SingleZipPackInstallTask::executeTask()
41{
42 setStatus(tr("Downloading modpack:\n%1").arg(m_sourceUrl.toString()));
43
44 const QString path = m_sourceUrl.host() + '/' + m_sourceUrl.path();
45 auto entry = APPLICATION->metacache()->resolveEntry("general", path);
46 entry->setStale(true);
47 m_filesNetJob = new NetJob(tr("Modpack download"), APPLICATION->network());
48 m_filesNetJob->addNetAction(Net::Download::makeCached(m_sourceUrl, entry));
49 m_archivePath = entry->getFullPath();
50 auto job = m_filesNetJob.get();
51 connect(job, &NetJob::succeeded, this, &Technic::SingleZipPackInstallTask::downloadSucceeded);
52 connect(job, &NetJob::progress, this, &Technic::SingleZipPackInstallTask::downloadProgressChanged);
53 connect(job, &NetJob::failed, this, &Technic::SingleZipPackInstallTask::downloadFailed);
54 m_filesNetJob->start();
55}
56
57void Technic::SingleZipPackInstallTask::downloadSucceeded()
58{

Callers

nothing calls this directly

Calls 10

pathMethod · 0.80
resolveEntryMethod · 0.80
metacacheMethod · 0.80
networkMethod · 0.80
addNetActionMethod · 0.80
getFullPathMethod · 0.80
toStringMethod · 0.45
setStaleMethod · 0.45
getMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected