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

Method downloadSucceeded

launcher/modplatform/technic/SolderPackInstallTask.cpp:135–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void Technic::SolderPackInstallTask::downloadSucceeded()
136{
137 m_abortable = false;
138
139 setStatus(tr("Extracting modpack"));
140 m_filesNetJob.reset();
141 m_extractFuture = QtConcurrent::run([this]()
142 {
143 int i = 0;
144 QString extractDir = FS::PathCombine(m_stagingPath, ".minecraft");
145 FS::ensureFolderPathExists(extractDir);
146
147 while (m_modCount > i)
148 {
149 auto path = FS::PathCombine(m_outputDir.path(), QString("%1").arg(i));
150 if (!MMCZip::extractDir(path, extractDir))
151 {
152 return false;
153 }
154 i++;
155 }
156 return true;
157 });
158 connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::finished, this, &Technic::SolderPackInstallTask::extractFinished);
159 connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::canceled, this, &Technic::SolderPackInstallTask::extractAborted);
160 m_extractFutureWatcher.setFuture(m_extractFuture);
161}
162
163void Technic::SolderPackInstallTask::downloadFailed(QString reason)
164{

Callers

nothing calls this directly

Calls 6

runFunction · 0.85
PathCombineFunction · 0.85
ensureFolderPathExistsFunction · 0.85
QStringClass · 0.85
pathMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected