X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fpasswordchangedlg.cpp;h=346c40ebee8c237353617fc57fd500588d14e6ef;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hp=ce016f227cea01f3c41dfa38b3277ce0f7c9245b;hpb=30b159cb876a9495de42e9a3e70ca050516f0805;p=quassel.git
diff --git a/src/qtui/passwordchangedlg.cpp b/src/qtui/passwordchangedlg.cpp
index ce016f22..346c40eb 100644
--- a/src/qtui/passwordchangedlg.cpp
+++ b/src/qtui/passwordchangedlg.cpp
@@ -25,14 +25,15 @@
#include "client.h"
-PasswordChangeDlg::PasswordChangeDlg(QWidget *parent) : QDialog(parent)
+PasswordChangeDlg::PasswordChangeDlg(QWidget* parent)
+ : QDialog(parent)
{
ui.setupUi(this);
CoreAccount account = Client::currentCoreAccount();
ui.infoLabel->setText(tr("This changes the password for your username %1 "
"on the Quassel Core running at %2.")
- .arg(account.user(), account.hostName()));
+ .arg(account.user(), account.hostName()));
connect(ui.oldPasswordEdit, &QLineEdit::textChanged, this, &PasswordChangeDlg::inputChanged);
connect(ui.newPasswordEdit, &QLineEdit::textChanged, this, &PasswordChangeDlg::inputChanged);
@@ -44,7 +45,6 @@ PasswordChangeDlg::PasswordChangeDlg(QWidget *parent) : QDialog(parent)
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
}
-
void PasswordChangeDlg::inputChanged()
{
bool ok = !ui.oldPasswordEdit->text().isEmpty() && !ui.newPasswordEdit->text().isEmpty()
@@ -52,21 +52,18 @@ void PasswordChangeDlg::inputChanged()
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(ok);
}
-
void PasswordChangeDlg::changePassword()
{
ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
Client::changePassword(ui.oldPasswordEdit->text(), ui.newPasswordEdit->text());
}
-
void PasswordChangeDlg::passwordChanged(bool success)
{
if (!success) {
- QMessageBox box(QMessageBox::Warning, tr("Password Not Changed"),
- tr("Password change failed"),
- QMessageBox::Ok, this);
- box.setInformativeText(tr("The core reported an error when trying to change your password. Make sure you entered your old password correctly!"));
+ QMessageBox box(QMessageBox::Warning, tr("Password Not Changed"), tr("Password change failed"), QMessageBox::Ok, this);
+ box.setInformativeText(
+ tr("The core reported an error when trying to change your password. Make sure you entered your old password correctly!"));
box.exec();
}
else {