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

Method kill

launcher/Application.cpp:1354–1369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352}
1353
1354bool Application::kill(InstancePtr instance)
1355{
1356 if (!instance->isRunning())
1357 {
1358 qWarning() << "Attempted to kill instance" << instance->id() << ", which isn't running.";
1359 return false;
1360 }
1361 auto & extras = m_instanceExtras[instance->id()];
1362 // NOTE: copy of the shared pointer keeps it alive
1363 auto controller = extras.controller;
1364 if(controller)
1365 {
1366 return controller->abort();
1367 }
1368 return true;
1369}
1370
1371void Application::addRunningInstance()
1372{

Callers 7

abortMethod · 0.45
abortMethod · 0.45
timeoutMethod · 0.45
abortMethod · 0.45
abortMethod · 0.45

Calls 3

isRunningMethod · 0.45
idMethod · 0.45
abortMethod · 0.45

Tested by

no test coverage detected