From e3709a4dd1c469f6c59d3199739b542b10b1a75e Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 1 Feb 2025 09:58:38 -0500 Subject: [PATCH] Actually return to the main page if a login error occurs in auto-login --- launcher/src/squareenixlogin.cpp | 1 + launcher/ui/Pages/StatusPage.qml | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/launcher/src/squareenixlogin.cpp b/launcher/src/squareenixlogin.cpp index 0aec235..1507651 100644 --- a/launcher/src/squareenixlogin.cpp +++ b/launcher/src/squareenixlogin.cpp @@ -393,6 +393,7 @@ QCoro::Task SquareEnixLogin::registerSession() std::string bodyStd = body.toStdString(); const bool hasPatched = co_await m_patcher->patch(physis_parse_patchlist(PatchListType::Game, bodyStd.c_str())); m_patcher->deleteLater(); + qInfo() << hasPatched; if (!hasPatched) { co_return false; } diff --git a/launcher/ui/Pages/StatusPage.qml b/launcher/ui/Pages/StatusPage.qml index 5c0cb60..bbf5798 100644 --- a/launcher/ui/Pages/StatusPage.qml +++ b/launcher/ui/Pages/StatusPage.qml @@ -2,12 +2,15 @@ // SPDX-License-Identifier: GPL-3.0-or-later import QtQuick +import QtQuick.Window import org.kde.kirigami as Kirigami import zone.xiv.astra Kirigami.Page { + id: root + property var gameInstaller title: i18n("Logging in...") @@ -34,8 +37,8 @@ Kirigami.Page { showCloseButton: false standardButtons: Kirigami.Dialog.Ok - onAccepted: applicationWindow().pageStack.layers.pop() - onRejected: applicationWindow().pageStack.layers.pop() + onAccepted: applicationWindow().checkSetup() + onRejected: applicationWindow().checkSetup() } Kirigami.PromptDialog { @@ -47,9 +50,9 @@ Kirigami.Page { onAccepted: { LauncherCore.currentProfile.dalamudEnabled = false; - applicationWindow().pageStack.layers.pop() + applicationWindow().checkSetup(); } - onRejected: applicationWindow().pageStack.layers.pop() + onRejected: applicationWindow().checkSetup() } Connections { @@ -88,4 +91,4 @@ Kirigami.Page { dalamudErrorDialog.open(); } } -} \ No newline at end of file +}