| 1408 | |
| 1409 | |
| 1410 | void Application::controllerSucceeded() |
| 1411 | { |
| 1412 | auto controller = qobject_cast<LaunchController *>(QObject::sender()); |
| 1413 | if(!controller) |
| 1414 | return; |
| 1415 | auto id = controller->id(); |
| 1416 | auto & extras = m_instanceExtras[id]; |
| 1417 | |
| 1418 | // on success, do... |
| 1419 | if (controller->instance()->settings()->get("AutoCloseConsole").toBool()) |
| 1420 | { |
| 1421 | if(extras.window) |
| 1422 | { |
| 1423 | extras.window->close(); |
| 1424 | } |
| 1425 | } |
| 1426 | extras.controller.reset(); |
| 1427 | subRunningInstance(); |
| 1428 | |
| 1429 | // quit when there are no more windows. |
| 1430 | if(shouldExitNow()) |
| 1431 | { |
| 1432 | m_status = Status::Succeeded; |
| 1433 | exit(0); |
| 1434 | } |
| 1435 | } |
| 1436 | |
| 1437 | void Application::controllerFailed(const QString& error) |
| 1438 | { |