From febb1933d9e6f78242abd5c02e6d1ec0dc78a307 Mon Sep 17 00:00:00 2001 From: Zetok Zalbavar Date: Fri, 16 Oct 2015 17:57:21 +0100 Subject: [PATCH] Make text about not long enough password disappear if no password given fixes #2405 --- src/widget/form/setpassworddialog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/widget/form/setpassworddialog.cpp b/src/widget/form/setpassworddialog.cpp index 86bc9f8db..e5f167cee 100644 --- a/src/widget/form/setpassworddialog.cpp +++ b/src/widget/form/setpassworddialog.cpp @@ -53,8 +53,12 @@ void SetPasswordDialog::onPasswordEdit() { QString pswd = ui->passwordlineEdit->text(); - - if (pswd.length() < 6) + if (pswd.isEmpty()) + { + ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); + ui->body->setText(body); + } + else if (pswd.length() < 6) { ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); ui->body->setText(body + tr("The password is too short"));