From 412855ae3d967ff81a383688397c4d9448a4ee15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 30 Oct 2016 02:37:38 +0100 Subject: NOISSUE refactor window management and launch, make MultiMC a single instance application. --- application/InstanceWindow.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'application/InstanceWindow.cpp') diff --git a/application/InstanceWindow.cpp b/application/InstanceWindow.cpp index 7b3e1d10..1c7731bd 100644 --- a/application/InstanceWindow.cpp +++ b/application/InstanceWindow.cpp @@ -174,11 +174,6 @@ void InstanceWindow::closeEvent(QCloseEvent *event) MMC->settings()->set("ConsoleWindowGeometry", saveGeometry().toBase64()); emit isClosing(); event->accept(); - if(m_shouldQuit) - { - // this needs to be delayed so we don't do horrible things - QMetaObject::invokeMethod(MMC, "quit", Qt::QueuedConnection); - } } bool InstanceWindow::saveAll() @@ -203,11 +198,7 @@ void InstanceWindow::on_btnKillMinecraft_clicked() // FIXME: duplicate logic between MainWindow and InstanceWindow else if(saveAll()) { - m_launchController.reset(new LaunchController()); - m_launchController->setInstance(m_instance); - m_launchController->setOnline(true); - m_launchController->setParentWidget(this); - m_launchController->start(); + MMC->launch(m_instance, true, nullptr); } } -- cgit v1.2.3