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

Method executeTask

launcher/modplatform/atlauncher/ATLPackInstallTask.cpp:41–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void PackInstallTask::executeTask()
42{
43 qDebug() << "PackInstallTask::executeTask: " << QThread::currentThreadId();
44 auto *netJob = new NetJob("ATLauncher::VersionFetch");
45 auto searchUrl = QString(BuildConfig.ATL_DOWNLOAD_SERVER_URL + "packs/%1/versions/%2/Configs.json")
46 .arg(m_pack).arg(m_version_name);
47 netJob->addNetAction(Net::Download::makeByteArray(QUrl(searchUrl), &response));
48 jobPtr = netJob;
49 jobPtr->start(APPLICATION->network());
50
51 QObject::connect(netJob, &NetJob::succeeded, this, &PackInstallTask::onDownloadSucceeded);
52 QObject::connect(netJob, &NetJob::failed, this, &PackInstallTask::onDownloadFailed);
53}
54
55void PackInstallTask::onDownloadSucceeded()
56{

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected