| 7 | } |
| 8 | |
| 9 | void 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 | |
| 28 | void MinecraftLoadAndCheck::subtaskSucceeded() |
| 29 | { |
nothing calls this directly
no test coverage detected