summaryrefslogtreecommitdiffstats
path: root/gui/MainWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-11-12 09:23:39 +0100
committerPetr Mrázek <peterix@gmail.com>2013-11-12 09:23:39 +0100
commitfdc58bb91360c04eed13a4fd4f8323a6a467dc37 (patch)
treec4cee6d1c623d60bd51bc254649749824f36d539 /gui/MainWindow.cpp
parente611aef0e77f727d0c77f6dea0d373e7a12b241c (diff)
downloadMultiMC-fdc58bb91360c04eed13a4fd4f8323a6a467dc37.tar
MultiMC-fdc58bb91360c04eed13a4fd4f8323a6a467dc37.tar.gz
MultiMC-fdc58bb91360c04eed13a4fd4f8323a6a467dc37.tar.lz
MultiMC-fdc58bb91360c04eed13a4fd4f8323a6a467dc37.tar.xz
MultiMC-fdc58bb91360c04eed13a4fd4f8323a6a467dc37.zip
Fix console not staying open on minecraft crash
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r--gui/MainWindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index 62ae195b..c0815d18 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -131,8 +131,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
view->installEventFilter(this);
proxymodel = new InstanceProxyModel(this);
-// proxymodel->setSortRole(KCategorizedSortFilterProxyModel::CategorySortRole);
- //proxymodel->setFilterRole(KCategorizedSortFilterProxyModel::CategorySortRole);
+ // proxymodel->setSortRole(KCategorizedSortFilterProxyModel::CategorySortRole);
+ // proxymodel->setFilterRole(KCategorizedSortFilterProxyModel::CategorySortRole);
// proxymodel->setDynamicSortFilter ( true );
// FIXME: instList should be global-ish, or at least not tied to the main window...
@@ -422,7 +422,7 @@ void MainWindow::on_actionSettings_triggered()
{
SettingsDialog dialog(this);
dialog.exec();
- //FIXME: quick HACK to make this work. improve, optimize.
+ // FIXME: quick HACK to make this work. improve, optimize.
proxymodel->invalidate();
proxymodel->sort(0);
}
@@ -725,7 +725,8 @@ void MainWindow::launchInstance(BaseInstance *instance, LoginResponse response)
connect(proc, SIGNAL(log(QString, MessageLevel::Enum)), console,
SLOT(write(QString, MessageLevel::Enum)));
- connect(proc, SIGNAL(ended(BaseInstance *)), this, SLOT(instanceEnded(BaseInstance *)));
+ connect(proc, SIGNAL(ended(BaseInstance *, int, ExitStatus)), this,
+ SLOT(instanceEnded(BaseInstance *, int, ExitStatus)));
if (instance->settings().get("ShowConsole").toBool())
{
@@ -882,7 +883,7 @@ void MainWindow::on_actionEditInstNotes_triggered()
}
}
-void MainWindow::instanceEnded(BaseInstance *instance)
+void MainWindow::instanceEnded(BaseInstance *instance, int code, QProcess::ExitStatus status)
{
this->show();
ui->actionLaunchInstance->setEnabled(m_selectedInstance);