Drop superfluous PasswordGeneratorWidget::togglePassword slot.

This commit is contained in:
Felix Geyer 2014-01-13 21:40:23 +01:00
parent 97f374a189
commit 04c9332a99
3 changed files with 4 additions and 8 deletions

View File

@ -33,11 +33,13 @@ public:
explicit PasswordComboBox(QWidget* parent = Q_NULLPTR);
~PasswordComboBox();
void setEcho(bool echo);
void setGenerator(PasswordGenerator* generator);
void setNumberAlternatives(int alternatives);
void showPopup();
public Q_SLOTS:
void setEcho(bool echo);
private:
PasswordGenerator* m_generator;
int m_alternatives;

View File

@ -35,7 +35,7 @@ PasswordGeneratorWidget::PasswordGeneratorWidget(QWidget* parent)
m_ui->togglePasswordButton->setIcon(filePath()->onOffIcon("actions", "password-show"));
connect(m_ui->editNewPassword->lineEdit(), SIGNAL(textChanged(QString)), SLOT(updateApplyEnabled(QString)));
connect(m_ui->togglePasswordButton, SIGNAL(toggled(bool)), SLOT(togglePassword(bool)));
connect(m_ui->togglePasswordButton, SIGNAL(toggled(bool)), m_ui->editNewPassword, SLOT(setEcho(bool)));
connect(m_ui->buttonApply, SIGNAL(clicked()), SLOT(emitNewPassword()));
connect(m_ui->buttonApply, SIGNAL(clicked()), SLOT(saveSettings()));
@ -93,11 +93,6 @@ void PasswordGeneratorWidget::updateApplyEnabled(const QString& password)
m_ui->buttonApply->setEnabled(!password.isEmpty());
}
void PasswordGeneratorWidget::togglePassword(bool checked)
{
m_ui->editNewPassword->setEcho(checked);
}
void PasswordGeneratorWidget::emitNewPassword()
{
Q_EMIT newPassword(m_ui->editNewPassword->lineEdit()->text());

View File

@ -45,7 +45,6 @@ Q_SIGNALS:
private Q_SLOTS:
void updateApplyEnabled(const QString& password);
void togglePassword(bool checked);
void emitNewPassword();
void saveSettings();