Allow for saving the configuration used by a window opened from a URL.
Note when editing a copy save password works now too.
This commit is contained in:
parent
05e9b982cd
commit
a6be979f8e
7 changed files with 43 additions and 16 deletions
|
|
@ -207,13 +207,13 @@ void ConnectionConfigurationWidget::setData(const ConnectionConfig &cfg)
|
|||
edtPassword->setText("");
|
||||
|
||||
cmbDbname->setCurrentText(cfg.dbname());
|
||||
//cmbbxSsl->setCurrentIndex(static_cast<int>(cfg.sslMode()));
|
||||
cmbbxSsl->setCurrentText(cfg.getParameter("sslmode"));
|
||||
edtCert->setText(cfg.sslCert());
|
||||
edtKey->setText(cfg.sslKey());
|
||||
edtRootCert->setText(cfg.sslRootCert());
|
||||
edtCrl->setText(cfg.sslCrl());
|
||||
|
||||
edtPassword->setText(cfg.password());
|
||||
encodedPassword = cfg.encodedPassword();
|
||||
cbSavePassword->setCheckState(
|
||||
encodedPassword.isEmpty()
|
||||
|
|
@ -234,7 +234,7 @@ ConnectionConfig ConnectionConfigurationWidget::data() const
|
|||
cfg.setUser(edtUser->text());
|
||||
cfg.setPassword(edtPassword->text());
|
||||
cfg.setDbname(cmbDbname->currentText());
|
||||
cfg.setSslMode(static_cast<SslMode>(cmbbxSsl->currentIndex()));
|
||||
cfg.setParameter("sslmode", cmbbxSsl->currentText());
|
||||
cfg.setSslCert(edtCert->text());
|
||||
cfg.setSslKey(edtKey->text());
|
||||
cfg.setSslRootCert(edtRootCert->text());
|
||||
|
|
@ -248,14 +248,14 @@ QString ConnectionConfigurationWidget::group() const
|
|||
return cmbbxGroup->currentText();
|
||||
}
|
||||
|
||||
bool ConnectionConfigurationWidget::savePassword() const
|
||||
bool ConnectionConfigurationWidget::savePasswordEnabled() const
|
||||
{
|
||||
return cbSavePassword->isChecked() && !edtPassword->text().isEmpty() && passwordChanged;
|
||||
return cbSavePassword->isChecked();
|
||||
}
|
||||
|
||||
bool ConnectionConfigurationWidget::clearPassword() const
|
||||
bool ConnectionConfigurationWidget::passwordIsChanged() const
|
||||
{
|
||||
return !cbSavePassword->isChecked();
|
||||
return passwordChanged;
|
||||
}
|
||||
|
||||
void ConnectionConfigurationWidget::testConnection()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue