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

Method fileDownloadFinished

launcher/modplatform/legacy_ftb/PackFetchTask.cpp:114–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void PackFetchTask::fileDownloadFinished()
115{
116 jobPtr.reset();
117
118 QStringList failedLists;
119
120 if(!parseAndAddPacks(publicModpacksXmlFileData, PackType::Public, publicPacks))
121 {
122 failedLists.append(tr("Public Packs"));
123 }
124
125 if(!parseAndAddPacks(thirdPartyModpacksXmlFileData, PackType::ThirdParty, thirdPartyPacks))
126 {
127 failedLists.append(tr("Third Party Packs"));
128 }
129
130 if(failedLists.size() > 0)
131 {
132 emit failed(tr("Failed to download some pack lists: %1").arg(failedLists.join("\n- ")));
133 }
134 else
135 {
136 emit finished(publicPacks, thirdPartyPacks);
137 }
138}
139
140bool PackFetchTask::parseAndAddPacks(QByteArray &data, PackType packType, ModpackList &list)
141{

Callers

nothing calls this directly

Calls 3

appendMethod · 0.80
resetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected