| 1352 | } |
| 1353 | |
| 1354 | bool 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 | |
| 1371 | void Application::addRunningInstance() |
| 1372 | { |
no test coverage detected