summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-10-26 08:38:21 +0100
committerSky <git@bunnies.cc>2013-10-26 08:38:21 +0100
commitc467ebf1327d6266fc51443edfac6f0b536b6602 (patch)
tree975225cfc5981d9f8e5b79ba224db02782aa4faf
parent0430a2a38fe3b6a18dc13090c236272fbb85df0b (diff)
downloadMultiMC-c467ebf1327d6266fc51443edfac6f0b536b6602.tar
MultiMC-c467ebf1327d6266fc51443edfac6f0b536b6602.tar.gz
MultiMC-c467ebf1327d6266fc51443edfac6f0b536b6602.tar.lz
MultiMC-c467ebf1327d6266fc51443edfac6f0b536b6602.tar.xz
MultiMC-c467ebf1327d6266fc51443edfac6f0b536b6602.zip
Fix "no windows means MMC exits prematurely" issue
-rw-r--r--MultiMC.cpp4
-rw-r--r--gui/mainwindow.cpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/MultiMC.cpp b/MultiMC.cpp
index 25c53185..3d62f76e 100644
--- a/MultiMC.cpp
+++ b/MultiMC.cpp
@@ -37,6 +37,9 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
initTranslations();
+ // Don't quit on hiding the last window
+ this->setQuitOnLastWindowClosed(false);
+
// Print app header
std::cout << "MultiMC 5" << std::endl;
std::cout << "(c) 2013 MultiMC Contributors" << std::endl << std::endl;
@@ -158,6 +161,7 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv)
m_status = MultiMC::Failed;
return;
}
+
m_status = MultiMC::Initialized;
}
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index ff1ac68a..46fd5bd7 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -444,6 +444,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
// settings->getConfig().setValue("MainWindowGeometry", saveGeometry());
// settings->getConfig().setValue("MainWindowState", saveState());
QMainWindow::closeEvent(event);
+ QApplication::exit();
}
/*
void MainWindow::on_instanceView_customContextMenuRequested(const QPoint &pos)