GH-1300 call application quit when direct launch instance quits
This commit is contained in:
parent
8a4fd8c468
commit
895d8ab469
4 changed files with 25 additions and 7 deletions
|
@ -21,7 +21,11 @@ int launchInstance(MultiMC &app, InstancePtr inst)
|
|||
LaunchController launchController;
|
||||
launchController.setInstance(inst);
|
||||
launchController.setOnline(true);
|
||||
launchController.launch();
|
||||
QMetaObject::invokeMethod(&launchController, "start", Qt::QueuedConnection);
|
||||
app.connect(&launchController, &Task::finished, [&app]()
|
||||
{
|
||||
app.quit();
|
||||
});
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue