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

Method kill

launcher/Application.cpp:1580–1595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1578}
1579
1580bool Application::kill(BaseInstance* instance)
1581{
1582 if (!instance->isRunning()) {
1583 qWarning() << "Attempted to kill instance" << instance->id() << ", which isn't running.";
1584 return false;
1585 }
1586 QMutexLocker locker(&m_instanceExtrasMutex);
1587 auto& extras = m_instanceExtras[instance->id()];
1588 // NOTE: copy of the shared pointer keeps it alive
1589 auto& controller = extras.controller;
1590 locker.unlock();
1591 if (controller) {
1592 return controller->abort();
1593 }
1594 return true;
1595}
1596
1597void Application::closeCurrentWindow()
1598{

Callers 7

abortMethod · 0.45
abortMethod · 0.45
checkForUpdatesMethod · 0.45
timeoutMethod · 0.45
InstanceWindowMethod · 0.45
abortMethod · 0.45

Calls 4

isRunningMethod · 0.45
idMethod · 0.45
unlockMethod · 0.45
abortMethod · 0.45

Tested by

no test coverage detected