Refactoring the new dialog manager module and fixed keyboard problem in Linux touch panel.
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include <QSqlRecord>
|
||||
|
||||
#include "components/AccountRoleComboDelegate.h"
|
||||
#include "dialogs/AlertDialog.h"
|
||||
#include "dialogs/DialogManager.h"
|
||||
#include "db/SQLHelper.h"
|
||||
#include "models/User.h"
|
||||
@@ -127,18 +126,11 @@ AccountTableForm::AccountTableForm(QWidget* aParent)
|
||||
if (User::Current()->getUserID() == id)
|
||||
{
|
||||
//尝试删除自己
|
||||
AlertDialog dialog(this);
|
||||
dialog.setButtonMode(OkOnly);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.setAlertMessage(tr("Can't delete current log in account!"));
|
||||
dialog.exec();
|
||||
DialogManager::Default()->requestAlertMessage(tr("Can't delete current log in account!"), DialogButtonMode::OkOnly);
|
||||
return;
|
||||
}
|
||||
AlertDialog dialog(this);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
|
||||
dialog.setAlertMessage(QString(tr("Delete account with ID:\"%1\"!")).arg(id));
|
||||
if (dialog.exec() != QDialog::Accepted) return;
|
||||
if ( DialogManager::Default()->requestAlertMessage(QString(tr("Delete account with ID:\"%1\"!")).arg(id), DialogButtonMode::OkAndCancel) != QDialog::Accepted) return;
|
||||
model->removeRow(mCurrentRow);
|
||||
model->select();
|
||||
table->selectRow(model->rowCount() > mCurrentRow + 1 ? mCurrentRow : mCurrentRow - 1);
|
||||
|
||||
Reference in New Issue
Block a user