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

Method executeTask

launcher/minecraft/launch/ScanModFolders.cpp:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41#include "minecraft/mod/ModFolderModel.h"
42
43void ScanModFolders::executeTask()
44{
45 auto m_inst = std::dynamic_pointer_cast<MinecraftInstance>(m_parent->instance());
46
47 auto loaders = m_inst->loaderModList();
48 connect(loaders.get(), &ModFolderModel::updateFinished, this, &ScanModFolders::modsDone);
49 if(!loaders->update()) {
50 m_modsDone = true;
51 }
52
53 auto cores = m_inst->coreModList();
54 connect(cores.get(), &ModFolderModel::updateFinished, this, &ScanModFolders::coreModsDone);
55 if(!cores->update()) {
56 m_coreModsDone = true;
57 }
58 checkDone();
59}
60
61void ScanModFolders::modsDone()
62{

Callers

nothing calls this directly

Calls 5

loaderModListMethod · 0.80
coreModListMethod · 0.80
instanceMethod · 0.45
getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected