| 1349 | |
| 1350 | |
| 1351 | void Application::controllerSucceeded() |
| 1352 | { |
| 1353 | auto controller = qobject_cast<LaunchController *>(QObject::sender()); |
| 1354 | if(!controller) |
| 1355 | return; |
| 1356 | auto id = controller->id(); |
| 1357 | auto & extras = m_instanceExtras[id]; |
| 1358 | |
| 1359 | // on success, do... |
| 1360 | if (controller->instance()->settings()->get("AutoCloseConsole").toBool()) |
| 1361 | { |
| 1362 | if(extras.window) |
| 1363 | { |
| 1364 | extras.window->close(); |
| 1365 | } |
| 1366 | } |
| 1367 | extras.controller.reset(); |
| 1368 | subRunningInstance(); |
| 1369 | |
| 1370 | // quit when there are no more windows. |
| 1371 | if(shouldExitNow()) |
| 1372 | { |
| 1373 | m_status = Status::Succeeded; |
| 1374 | exit(0); |
| 1375 | } |
| 1376 | } |
| 1377 | |
| 1378 | void Application::controllerFailed(const QString& error) |
| 1379 | { |