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

Method addNetAction

launcher/net/NetJob.cpp:197–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197bool NetJob::addNetAction(NetAction::Ptr action)
198{
199 action->m_index_within_job = downloads.size();
200 downloads.append(action);
201 part_info pi;
202 parts_progress.append(pi);
203 partProgress(parts_progress.count() - 1, action->currentProgress(), action->totalProgress());
204
205 if(action->isRunning())
206 {
207 connect(action.get(), SIGNAL(succeeded(int)), SLOT(partSucceeded(int)));
208 connect(action.get(), SIGNAL(failed(int)), SLOT(partFailed(int)));
209 connect(action.get(), SIGNAL(netActionProgress(int, qint64, qint64)), SLOT(partProgress(int, qint64, qint64)));
210 }
211 else
212 {
213 m_todo.append(parts_progress.size() - 1);
214 }
215 return true;
216}
217
218NetJob::~NetJob() = default;

Callers 15

executeTaskMethod · 0.80
processFlameMethod · 0.80
checkForNotificationsMethod · 0.80
executeTaskMethod · 0.80
installConfigsMethod · 0.80
downloadModsMethod · 0.80
fetchMethod · 0.80
fetchPrivateMethod · 0.80
downloadPackMethod · 0.80
executeTaskMethod · 0.80
executeTaskMethod · 0.80
versionSucceededMethod · 0.80

Calls 7

appendMethod · 0.80
currentProgressMethod · 0.80
totalProgressMethod · 0.80
sizeMethod · 0.45
countMethod · 0.45
isRunningMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected