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

Method downloadSucceeded

launcher/modplatform/technic/SolderPackInstallTask.cpp:119–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void Technic::SolderPackInstallTask::downloadSucceeded()
120{
121 m_abortable = false;
122
123 setStatus(tr("Extracting modpack"));
124 m_filesNetJob.reset();
125 m_extractFuture = QtConcurrent::run([this]()
126 {
127 int i = 0;
128 QString extractDir = FS::PathCombine(m_stagingPath, ".minecraft");
129 FS::ensureFolderPathExists(extractDir);
130
131 while (m_modCount > i)
132 {
133 auto path = FS::PathCombine(m_outputDir.path(), QString("%1").arg(i));
134 if (!MMCZip::extractDir(path, extractDir))
135 {
136 return false;
137 }
138 i++;
139 }
140 return true;
141 });
142 connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::finished, this, &Technic::SolderPackInstallTask::extractFinished);
143 connect(&m_extractFutureWatcher, &QFutureWatcher<QStringList>::canceled, this, &Technic::SolderPackInstallTask::extractAborted);
144 m_extractFutureWatcher.setFuture(m_extractFuture);
145}
146
147void Technic::SolderPackInstallTask::downloadFailed(QString reason)
148{

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