From 61c5a67777a6f7639c9d2f36b14f7a903bdfc5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 21 Jul 2015 02:38:15 +0200 Subject: GH-1053 explode launch task into many small steps, each a Task --- application/ConsoleWindow.cpp | 2 +- application/LaunchInteraction.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'application') 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 #include #include +#include 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(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) { -- cgit v1.2.3