1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 19:57:45 +00:00

Make auto-login cancel button actually functional

This commit is contained in:
Joshua Goins 2022-08-31 21:31:03 -04:00
parent 5ee036dd09
commit 33f68c5586
2 changed files with 8 additions and 4 deletions

View file

@ -53,11 +53,12 @@ DesktopInterface::DesktopInterface(LauncherCore& core) {
if(defaultProfile.autoLogin) { if(defaultProfile.autoLogin) {
autoLoginWindow = new AutoLoginWindow(defaultProfile, core); autoLoginWindow = new AutoLoginWindow(defaultProfile, core);
QObject::connect(autoLoginWindow, &AutoLoginWindow::loginCanceled, [this] { autoLoginWindow->show();
QObject::connect(autoLoginWindow, &AutoLoginWindow::loginCanceled,[=] {
autoLoginWindow->hide(); autoLoginWindow->hide();
window->show(); window->show();
}); });
autoLoginWindow->show();
} else { } else {
window->show(); window->show();
} }

View file

@ -62,13 +62,16 @@ int main(int argc, char* argv[]) {
} }
LauncherCore c; LauncherCore c;
std::unique_ptr<DesktopInterface> desktopInterface;
std::unique_ptr<TabletInterface> tabletInterface;
if (parser.isSet(tabletOption)) { if (parser.isSet(tabletOption)) {
std::make_unique<TabletInterface>(c); tabletInterface = std::make_unique<TabletInterface>(c);
} else if (parser.isSet(cliOption)) { } else if (parser.isSet(cliOption)) {
if (!cmd->parse(parser, c)) if (!cmd->parse(parser, c))
return -1; return -1;
} else { } else {
std::make_unique<DesktopInterface>(c); desktopInterface = std::make_unique<DesktopInterface>(c);
} }
return app.exec(); return app.exec();