fixing logout bug from syntax reversion

This commit is contained in:
Wayne Chen 2018-09-11 12:51:51 -07:00
parent d69e536120
commit e7aef92e99

View file

@ -78,9 +78,7 @@ void LoginDialog::toggleAction() {
if (accountManager->isLoggedIn()) {
// change the menu item to logout
loginAction->setText("Logout " + accountManager->getAccountInfo().getUsername());
connection = connect(loginAction, &QAction::triggered, [] {
LoginDialog::showWithSelection();
});
connection = connect(loginAction, &QAction::triggered, accountManager.data(), &AccountManager::logout);
} else {
// change the menu item to login
loginAction->setText("Login / Sign Up");