Drop autoconnections

Use typed connections instead.

Change-Id: I04205c877541722cc059398a146a216727daa103
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2020-11-17 10:49:48 +01:00
parent 3b571a2c70
commit 0a230928c0
6 changed files with 54 additions and 46 deletions

View File

@@ -54,6 +54,14 @@ AndroidCreateKeystoreCertificate::AndroidCreateKeystoreCertificate(QWidget *pare
this, &AndroidCreateKeystoreCertificate::checkCertificateAlias);
connect(ui->countryLineEdit, &QLineEdit::textChanged,
this, &AndroidCreateKeystoreCertificate::checkCountryCode);
connect(ui->keystoreShowPassCheckBox, &QCheckBox::stateChanged,
this, &AndroidCreateKeystoreCertificate::keystoreShowPassStateChanged);
connect(ui->certificateShowPassCheckBox, &QCheckBox::stateChanged,
this, &AndroidCreateKeystoreCertificate::certificateShowPassStateChanged);
connect(ui->samePasswordCheckBox, &QCheckBox::stateChanged,
this, &AndroidCreateKeystoreCertificate::samePasswordStateChanged);
connect(ui->buttonBox, &QDialogButtonBox::accepted,
this, &AndroidCreateKeystoreCertificate::buttonBoxAccepted);
connect(ui->buttonBox, &QDialogButtonBox::rejected,
this, &QDialog::reject);
connect(ui->keystorePassLineEdit,
@@ -144,19 +152,19 @@ bool AndroidCreateKeystoreCertificate::checkCountryCode()
return true;
}
void AndroidCreateKeystoreCertificate::on_keystoreShowPassCheckBox_stateChanged(int state)
void AndroidCreateKeystoreCertificate::keystoreShowPassStateChanged(int state)
{
ui->keystorePassLineEdit->setEchoMode(state == Qt::Checked ? QLineEdit::Normal : QLineEdit::Password);
ui->keystoreRetypePassLineEdit->setEchoMode(ui->keystorePassLineEdit->echoMode());
}
void AndroidCreateKeystoreCertificate::on_certificateShowPassCheckBox_stateChanged(int state)
void AndroidCreateKeystoreCertificate::certificateShowPassStateChanged(int state)
{
ui->certificatePassLineEdit->setEchoMode(state == Qt::Checked ? QLineEdit::Normal : QLineEdit::Password);
ui->certificateRetypePassLineEdit->setEchoMode(ui->certificatePassLineEdit->echoMode());
}
void AndroidCreateKeystoreCertificate::on_buttonBox_accepted()
void AndroidCreateKeystoreCertificate::buttonBoxAccepted()
{
if (!validateUserInput())
return;
@@ -200,7 +208,7 @@ void AndroidCreateKeystoreCertificate::on_buttonBox_accepted()
accept();
}
void AndroidCreateKeystoreCertificate::on_samePasswordCheckBox_stateChanged(int state)
void AndroidCreateKeystoreCertificate::samePasswordStateChanged(int state)
{
if (state == Qt::Checked) {
ui->certificatePassLineEdit->setDisabled(true);

View File

@@ -61,10 +61,10 @@ private:
bool checkCountryCode();
private slots:
void on_keystoreShowPassCheckBox_stateChanged(int state);
void on_certificateShowPassCheckBox_stateChanged(int state);
void on_buttonBox_accepted();
void on_samePasswordCheckBox_stateChanged(int state);
void keystoreShowPassStateChanged(int state);
void certificateShowPassStateChanged(int state);
void buttonBoxAccepted();
void samePasswordStateChanged(int state);
private:
bool validateUserInput();