| 1334 | |
| 1335 | |
| 1336 | void Application::controllerSucceeded() |
| 1337 | { |
| 1338 | auto controller = qobject_cast<LaunchController *>(QObject::sender()); |
| 1339 | if(!controller) |
| 1340 | return; |
| 1341 | auto id = controller->id(); |
| 1342 | auto & extras = m_instanceExtras[id]; |
| 1343 | |
| 1344 | // on success, do... |
| 1345 | if (controller->instance()->settings()->get("AutoCloseConsole").toBool()) |
| 1346 | { |
| 1347 | if(extras.window) |
| 1348 | { |
| 1349 | extras.window->close(); |
| 1350 | } |
| 1351 | } |
| 1352 | extras.controller.reset(); |
| 1353 | subRunningInstance(); |
| 1354 | |
| 1355 | // quit when there are no more windows. |
| 1356 | if(shouldExitNow()) |
| 1357 | { |
| 1358 | m_status = Status::Succeeded; |
| 1359 | exit(0); |
| 1360 | } |
| 1361 | } |
| 1362 | |
| 1363 | void Application::controllerFailed(const QString& error) |
| 1364 | { |