summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-07-21 02:38:15 +0200
committerPetr Mrázek <peterix@gmail.com>2015-07-21 02:38:15 +0200
commit61c5a67777a6f7639c9d2f36b14f7a903bdfc5a0 (patch)
treece1e124a44f48d221d40c5534e438ef60491831c /application
parent8e7caf4e25dc3f56877a504c45d157860215496b (diff)
downloadMultiMC-61c5a67777a6f7639c9d2f36b14f7a903bdfc5a0.tar
MultiMC-61c5a67777a6f7639c9d2f36b14f7a903bdfc5a0.tar.gz
MultiMC-61c5a67777a6f7639c9d2f36b14f7a903bdfc5a0.tar.lz
MultiMC-61c5a67777a6f7639c9d2f36b14f7a903bdfc5a0.tar.xz
MultiMC-61c5a67777a6f7639c9d2f36b14f7a903bdfc5a0.zip
GH-1053 explode launch task into many small steps, each a Task
Diffstat (limited to 'application')
-rw-r--r--application/ConsoleWindow.cpp2
-rw-r--r--application/LaunchInteraction.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/application/ConsoleWindow.cpp b/application/ConsoleWindow.cpp
index 35bc9a8a..9dc5874d 100644
--- a/application/ConsoleWindow.cpp
+++ b/application/ConsoleWindow.cpp
@@ -211,7 +211,7 @@ void ConsoleWindow::on_btnKillMinecraft_clicked()
"is frozen for some reason"),
QMessageBox::Question, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)->exec();
if (response == QMessageBox::Yes)
- m_proc->killProcess();
+ m_proc->abort();
else
m_killButton->setEnabled(true);
}
diff --git a/application/LaunchInteraction.cpp b/application/LaunchInteraction.cpp
index 8ccc46a4..070c8249 100644
--- a/application/LaunchInteraction.cpp
+++ b/application/LaunchInteraction.cpp
@@ -13,6 +13,7 @@
#include <QInputDialog>
#include <tasks/Task.h>
#include <auth/YggdrasilTask.h>
+#include <launch/steps/TextPrint.h>
LaunchController::LaunchController(QObject *parent) : QObject(parent)
{
@@ -172,7 +173,7 @@ void LaunchController::launchInstance()
connect(m_console, &ConsoleWindow::isClosing, this, &LaunchController::instanceEnded);
connect(m_launcher.get(), &LaunchTask::readyForLaunch, this, &LaunchController::readyForLaunch);
- m_launcher->setHeader("MultiMC version: " + BuildConfig.printableVersionString() + "\n\n");
+ m_launcher->prependStep(std::make_shared<TextPrint>(m_launcher.get(), "MultiMC version: " + BuildConfig.printableVersionString() + "\n\n", MessageLevel::MultiMC));
m_launcher->start();
}
@@ -180,7 +181,7 @@ void LaunchController::readyForLaunch()
{
if (!m_profiler)
{
- m_launcher->launch();
+ m_launcher->proceed();
return;
}
@@ -204,7 +205,7 @@ void LaunchController::readyForLaunch()
msg.addButton(tr("Launch"), QMessageBox::AcceptRole);
msg.setModal(true);
msg.exec();
- m_launcher->launch();
+ m_launcher->proceed();
});
connect(profilerInstance, &BaseProfiler::abortLaunch, [this](const QString & message)
{