1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Make text about not long enough password disappear if no password given

fixes #2405
This commit is contained in:
Zetok Zalbavar 2015-10-16 17:57:21 +01:00
parent 69380d5159
commit febb1933d9
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -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"));