From 895d8ab4699f1b50bf03532c967a91f5ecb62a50 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sat, 24 Oct 2015 00:57:54 +0200 Subject: GH-1300 call application quit when direct launch instance quits --- application/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'application/main.cpp') diff --git a/application/main.cpp b/application/main.cpp index c134facb..a8951d33 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -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(); } -- cgit