Don't obscure password field after invalid password attempt if setting is off (#2353)

This commit is contained in:
Darwin Shameran 2018-10-30 15:16:49 +02:00 committed by Jonathan White
parent 4e1d3bfd73
commit 5bf4f51389
3 changed files with 8 additions and 1 deletions

View File

@ -184,7 +184,9 @@ void DatabaseOpenWidget::openDatabase()
return;
}
if (!m_ui->editPassword->isPasswordVisible()) {
m_ui->editPassword->setShowPassword(false);
}
QCoreApplication::processEvents();
QFile file(m_filename);

View File

@ -71,6 +71,10 @@ void PasswordEdit::setShowPassword(bool show)
emit showPasswordChanged(show);
}
bool PasswordEdit::isPasswordVisible() const {
return isEnabled();
}
bool PasswordEdit::passwordsEqual() const
{
return text() == m_basePasswordEdit->text();

View File

@ -31,6 +31,7 @@ public:
explicit PasswordEdit(QWidget* parent = nullptr);
void enableVerifyMode(PasswordEdit* baseEdit);
bool isPasswordVisible() const;
public slots:
void setShowPassword(bool show);