Add confirm logout.
This commit is contained in:
@@ -152,6 +152,10 @@ void AccountFormDialog::addSelfModeUI(QHBoxLayout* hlayout)
|
||||
|
||||
hlayout->addWidget(btnLogout);
|
||||
connect(btnLogout, &QAbstractButton::clicked, [=]() {
|
||||
if(DialogManager::Default()->requestAlertMessage(tr("Do you want to logout the current user?"), OkAndCancel, tr("Logout")) == QDialog::Rejected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
accept();
|
||||
LOG_USER_OPERATION("Logout")
|
||||
EventCenter::Default()->triggerEvent(RequestLogin, nullptr, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user