Commit 5e6a53ba authored by Ivan Čukić's avatar Ivan Čukić 👁

Reset password field when the user clicks Ok

- Clear the password on unsuccessful vault open
- If the user clicked to show the password, it gets hidden as
  soon as Ok is clicked

  BUG:424063
parent 46abe11e
......@@ -80,6 +80,7 @@ void MountDialog::accept()
m_errorLabel->setVisible(false);
setEnabled(false);
m_ui.password->lineEdit()->setEchoMode(QLineEdit::Password);
m_ui.password->lineEdit()->setCursor(Qt::WaitCursor);
QString pwd = m_ui.password->password();
auto future = m_vault->open({ { KEY_PASSWORD, pwd } });
......@@ -93,6 +94,7 @@ void MountDialog::accept()
QDialog::accept();
} else {
m_lastError = result.error();
m_ui.password->lineEdit()->setText({});
m_errorLabel->setText(i18n("Failed to open: %1", m_lastError.message()));
m_errorLabel->setVisible(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment