Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/KeyOpenDialog.cpp')
-rw-r--r--src/gui/KeyOpenDialog.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/KeyOpenDialog.cpp b/src/gui/KeyOpenDialog.cpp
index 34fd2beab..225534ed0 100644
--- a/src/gui/KeyOpenDialog.cpp
+++ b/src/gui/KeyOpenDialog.cpp
@@ -26,6 +26,8 @@ KeyOpenDialog::KeyOpenDialog(QWidget* parent)
{
m_ui->setupUi(this);
+ connect(m_ui->buttonTogglePassword, SIGNAL(toggled(bool)), SLOT(togglePassword(bool)));
+ connect(m_ui->editPassword, SIGNAL(textChanged(QString)), SLOT(activatePassword()));
connect(m_ui->buttonBox, SIGNAL(accepted()), SLOT(createKey()));
}
@@ -48,3 +50,13 @@ void KeyOpenDialog::createKey()
// TODO read key file
}
}
+
+void KeyOpenDialog::togglePassword(bool checked)
+{
+ m_ui->editPassword->setEchoMode(checked ? QLineEdit::Password : QLineEdit::Normal);
+}
+
+void KeyOpenDialog::activatePassword()
+{
+ m_ui->checkPassword->setChecked(true);
+}