From 33f68c558660f11dcf6c1c5b099fc2ac819731a0 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 31 Aug 2022 21:31:03 -0400 Subject: [PATCH] Make auto-login cancel button actually functional --- launcher/desktop/src/desktopinterface.cpp | 5 +++-- launcher/main.cpp | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/launcher/desktop/src/desktopinterface.cpp b/launcher/desktop/src/desktopinterface.cpp index 402b936..6bfdc46 100644 --- a/launcher/desktop/src/desktopinterface.cpp +++ b/launcher/desktop/src/desktopinterface.cpp @@ -53,11 +53,12 @@ DesktopInterface::DesktopInterface(LauncherCore& core) { if(defaultProfile.autoLogin) { autoLoginWindow = new AutoLoginWindow(defaultProfile, core); - QObject::connect(autoLoginWindow, &AutoLoginWindow::loginCanceled, [this] { + autoLoginWindow->show(); + + QObject::connect(autoLoginWindow, &AutoLoginWindow::loginCanceled,[=] { autoLoginWindow->hide(); window->show(); }); - autoLoginWindow->show(); } else { window->show(); } diff --git a/launcher/main.cpp b/launcher/main.cpp index 0848ba1..2274dcd 100755 --- a/launcher/main.cpp +++ b/launcher/main.cpp @@ -62,13 +62,16 @@ int main(int argc, char* argv[]) { } LauncherCore c; + std::unique_ptr desktopInterface; + std::unique_ptr tabletInterface; + if (parser.isSet(tabletOption)) { - std::make_unique(c); + tabletInterface = std::make_unique(c); } else if (parser.isSet(cliOption)) { if (!cmd->parse(parser, c)) return -1; } else { - std::make_unique(c); + desktopInterface = std::make_unique(c); } return app.exec();