mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-05 21:47:38 +03:00
Make toggle password button in ChangeMasterKey widget work.
This commit is contained in:
parent
26c4dedd01
commit
e06937287c
3 changed files with 16 additions and 1 deletions
|
@ -31,12 +31,19 @@ ChangeMasterKeyWidget::ChangeMasterKeyWidget(QWidget* parent)
|
|||
|
||||
connect(m_ui->buttonBox, SIGNAL(accepted()), SLOT(generateKey()));
|
||||
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(reject()));
|
||||
connect(m_ui->togglePasswordButton, SIGNAL(toggled(bool)), SLOT(togglePassword(bool)));
|
||||
}
|
||||
|
||||
ChangeMasterKeyWidget::~ChangeMasterKeyWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void ChangeMasterKeyWidget::togglePassword(bool checked)
|
||||
{
|
||||
m_ui->enterPasswordEdit->setEchoMode(checked ? QLineEdit::Password : QLineEdit::Normal);
|
||||
m_ui->repeatPasswordEdit->setEchoMode(checked ? QLineEdit::Password : QLineEdit::Normal);
|
||||
}
|
||||
|
||||
void ChangeMasterKeyWidget::clearForms()
|
||||
{
|
||||
m_key.clear();
|
||||
|
@ -45,6 +52,7 @@ void ChangeMasterKeyWidget::clearForms()
|
|||
m_ui->enterPasswordEdit->setText("");
|
||||
m_ui->repeatPasswordEdit->setText("");
|
||||
m_ui->keyFileGroup->setChecked(false);
|
||||
m_ui->togglePasswordButton->setChecked(true);
|
||||
// TODO clear m_ui->keyFileCombo
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue