MCPcopy Create free account
hub / github.com/MultiMC/Launcher / executeTask

Method executeTask

launcher/modplatform/atlauncher/ATLPackInstallTask.cpp:58–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void PackInstallTask::executeTask()
59{
60 qDebug() << "PackInstallTask::executeTask: " << QThread::currentThreadId();
61 auto *netJob = new NetJob("ATLauncher::VersionFetch", APPLICATION->network());
62 auto searchUrl = QString(BuildConfig.ATL_DOWNLOAD_SERVER_URL + "packs/%1/versions/%2/Configs.json")
63 .arg(m_pack).arg(m_version_name);
64 netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
65 jobPtr = netJob;
66 jobPtr->start();
67
68 QObject::connect(netJob, &NetJob::succeeded, this, &PackInstallTask::onDownloadSucceeded);
69 QObject::connect(netJob, &NetJob::failed, this, &PackInstallTask::onDownloadFailed);
70}
71
72void PackInstallTask::onDownloadSucceeded()
73{

Callers

nothing calls this directly

Calls 5

QStringClass · 0.85
QUrlClass · 0.85
networkMethod · 0.80
addNetActionMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected