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

Method fetch

launcher/modplatform/legacy_ftb/PackFetchTask.cpp:10–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace LegacyFTB {
9
10void PackFetchTask::fetch()
11{
12 publicPacks.clear();
13 thirdPartyPacks.clear();
14
15 jobPtr = new NetJob("LegacyFTB::ModpackFetch", m_network);
16
17 QUrl publicPacksUrl = QUrl(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "static/modpacks.xml");
18 qDebug() << "Downloading public version info from" << publicPacksUrl.toString();
19 jobPtr->addNetAction(Net::Download::makeByteArray(publicPacksUrl, &publicModpacksXmlFileData));
20
21 QUrl thirdPartyUrl = QUrl(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "static/thirdparty.xml");
22 qDebug() << "Downloading thirdparty version info from" << thirdPartyUrl.toString();
23 jobPtr->addNetAction(Net::Download::makeByteArray(thirdPartyUrl, &thirdPartyModpacksXmlFileData));
24
25 QObject::connect(jobPtr.get(), &NetJob::succeeded, this, &PackFetchTask::fileDownloadFinished);
26 QObject::connect(jobPtr.get(), &NetJob::failed, this, &PackFetchTask::fileDownloadFailed);
27
28 jobPtr->start();
29}
30
31void PackFetchTask::fetchPrivate(const QStringList & toFetch)
32{

Callers 1

openedImplMethod · 0.80

Calls 6

QUrlClass · 0.85
addNetActionMethod · 0.80
clearMethod · 0.45
toStringMethod · 0.45
getMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected