From 3d3f9a8609308ed141c47921607c6e60b1558493 Mon Sep 17 00:00:00 2001 From: swirl Date: Sat, 29 Jan 2022 21:51:45 -0500 Subject: make closeAfterLaunch good --- launcher/minecraft/launch/LauncherPartLaunch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'launcher/minecraft/launch') diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp index e07e20b7..f461b847 100644 --- a/launcher/minecraft/launch/LauncherPartLaunch.cpp +++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp @@ -25,12 +25,12 @@ LauncherPartLaunch::LauncherPartLaunch(LaunchTask *parent) : LaunchStep(parent) { - if (APPLICATION->settings()->get("CloseAfterLaunch").toBoolean()) + if (APPLICATION->settings()->get("CloseAfterLaunch").toBool()) { std::shared_ptr connection{new QMetaObject::Connection}; *connection = connect(&m_process, &LoggedProcess::log, this, [=](QStringList lines, MessageLevel::Enum level) { qDebug() << lines; - if (lines.filter(QRegularExpression(".+Backend library: LWJGL version.+")).length() != 0) + if (lines.filter(QRegularExpression(".*Setting user.+", QRegularExpression::CaseInsensitiveOption)).length() != 0) { APPLICATION->closeAllWindows(); disconnect(*connection); @@ -168,7 +168,7 @@ void LauncherPartLaunch::on_state(LoggedProcess::State state) } case LoggedProcess::Finished: { - if (APPLICATION->settings()->get("CloseAfterLaunch").toBoolean()) + if (APPLICATION->settings()->get("CloseAfterLaunch").toBool()) APPLICATION->showMainWindow(); m_parent->setPid(-1); // if the exit code wasn't 0, report this as a crash -- cgit