mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Make toggle password button in ChangeMasterKey widget work.
This commit is contained in:
parent
26c4dedd01
commit
e06937287c
@ -31,12 +31,19 @@ ChangeMasterKeyWidget::ChangeMasterKeyWidget(QWidget* parent)
|
|||||||
|
|
||||||
connect(m_ui->buttonBox, SIGNAL(accepted()), SLOT(generateKey()));
|
connect(m_ui->buttonBox, SIGNAL(accepted()), SLOT(generateKey()));
|
||||||
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(reject()));
|
connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(reject()));
|
||||||
|
connect(m_ui->togglePasswordButton, SIGNAL(toggled(bool)), SLOT(togglePassword(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeMasterKeyWidget::~ChangeMasterKeyWidget()
|
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()
|
void ChangeMasterKeyWidget::clearForms()
|
||||||
{
|
{
|
||||||
m_key.clear();
|
m_key.clear();
|
||||||
@ -45,6 +52,7 @@ void ChangeMasterKeyWidget::clearForms()
|
|||||||
m_ui->enterPasswordEdit->setText("");
|
m_ui->enterPasswordEdit->setText("");
|
||||||
m_ui->repeatPasswordEdit->setText("");
|
m_ui->repeatPasswordEdit->setText("");
|
||||||
m_ui->keyFileGroup->setChecked(false);
|
m_ui->keyFileGroup->setChecked(false);
|
||||||
|
m_ui->togglePasswordButton->setChecked(true);
|
||||||
// TODO clear m_ui->keyFileCombo
|
// TODO clear m_ui->keyFileCombo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ Q_SIGNALS:
|
|||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void generateKey();
|
void generateKey();
|
||||||
void reject();
|
void reject();
|
||||||
|
void togglePassword(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::ChangeMasterKeyWidget> m_ui;
|
QScopedPointer<Ui::ChangeMasterKeyWidget> m_ui;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>438</width>
|
<width>438</width>
|
||||||
<height>237</height>
|
<height>242</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
@ -63,6 +63,12 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>...</string>
|
<string>...</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
Reference in New Issue
Block a user