| 1578 | } |
| 1579 | |
| 1580 | bool 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 | |
| 1597 | void Application::closeCurrentWindow() |
| 1598 | { |
no test coverage detected