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

Method executeTask

launcher/minecraft/MinecraftLoadAndCheck.cpp:9–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9void MinecraftLoadAndCheck::executeTask()
10{
11 // add offline metadata load task
12 auto components = m_inst->getPackProfile();
13 components->reload(Net::Mode::Offline);
14 m_task = components->getCurrentTask();
15
16 if(!m_task)
17 {
18 emitSucceeded();
19 return;
20 }
21 connect(m_task.get(), &Task::succeeded, this, &MinecraftLoadAndCheck::subtaskSucceeded);
22 connect(m_task.get(), &Task::failed, this, &MinecraftLoadAndCheck::subtaskFailed);
23 connect(m_task.get(), &Task::aborted, this, [this]{ subtaskFailed(tr("Aborted")); });
24 connect(m_task.get(), &Task::progress, this, &MinecraftLoadAndCheck::progress);
25 connect(m_task.get(), &Task::status, this, &MinecraftLoadAndCheck::setStatus);
26}
27
28void MinecraftLoadAndCheck::subtaskSucceeded()
29{

Callers

nothing calls this directly

Calls 4

getPackProfileMethod · 0.80
reloadMethod · 0.45
getCurrentTaskMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected