summaryrefslogtreecommitdiffstats
path: root/gui/MainWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-16 00:10:45 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-16 00:10:45 +0100
commit7ceb2cacb129d5924087f616cfc0b949689ed4fe (patch)
tree0bf4136e72a4d6bd56bbaf434fbddced719b01cd /gui/MainWindow.cpp
parent8219dbf612f4e6f603d304348fc388e364602f98 (diff)
downloadMultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.gz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.lz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.xz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.zip
Fix a few bugs in profilers.
* Legacy was launching before the profiler. * Some clarity changes. * Report problem with empty strings as profiler paths.
Diffstat (limited to 'gui/MainWindow.cpp')
-rw-r--r--gui/MainWindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp
index b4811579..7c61ca9d 100644
--- a/gui/MainWindow.cpp
+++ b/gui/MainWindow.cpp
@@ -1239,7 +1239,7 @@ void MainWindow::launchInstance(BaseInstance *instance, AuthSessionPtr session,
connect(console, SIGNAL(isClosing()), this, SLOT(instanceEnded()));
proc->setLogin(session);
- proc->launch();
+ proc->arm();
if (profiler)
{
@@ -1247,6 +1247,7 @@ void MainWindow::launchInstance(BaseInstance *instance, AuthSessionPtr session,
if (!profiler->check(&error))
{
QMessageBox::critical(this, tr("Error"), tr("Couldn't start profiler: %1").arg(error));
+ proc->abort();
return;
}
BaseProfiler *profilerInstance = profiler->createProfiler(instance, this);
@@ -1267,14 +1268,14 @@ void MainWindow::launchInstance(BaseInstance *instance, AuthSessionPtr session,
msg.setIcon(QMessageBox::Information);
msg.addButton(tr("Launch"), QMessageBox::AcceptRole);
msg.exec();
- proc->write("launch\n");
+ proc->launch();
});
profilerInstance->beginProfiling(proc);
dialog.exec();
}
else
{
- proc->write("launch\n");
+ proc->launch();
}
}