diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2021-03-06 20:26:21 +0100 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2021-03-06 20:29:50 +0100 |
| commit | 0396fdb01d12e51bd2cc63478819b366c0453d29 (patch) | |
| tree | 082fcd53b7b61c0dc2a0dc6b676729e155c07fd2 /src/dialogs/certificateselectiondialog.cpp | |
| parent | 21c821c49ef82d1e84b0b9c8c3d357dc559479d4 (diff) | |
| download | kristall-0396fdb01d12e51bd2cc63478819b366c0453d29.tar.gz | |
Moves all globals into a structure that can be deleted before the app exists. Fixes #193.
Diffstat (limited to 'src/dialogs/certificateselectiondialog.cpp')
| -rw-r--r-- | src/dialogs/certificateselectiondialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dialogs/certificateselectiondialog.cpp b/src/dialogs/certificateselectiondialog.cpp index 2c08110..4d7d5ff 100644 --- a/src/dialogs/certificateselectiondialog.cpp +++ b/src/dialogs/certificateselectiondialog.cpp @@ -16,7 +16,7 @@ CertificateSelectionDialog::CertificateSelectionDialog(QWidget *parent) : ui->setupUi(this); this->ui->server_request->setVisible(false); - this->ui->certificates->setModel(&kristall::identities); + this->ui->certificates->setModel(&kristall::globals().identities); this->ui->certificates->expandAll(); connect(this->ui->certificates->selectionModel(), &QItemSelectionModel::currentChanged, this, &CertificateSelectionDialog::on_currentChanged); @@ -86,7 +86,7 @@ void CertificateSelectionDialog::on_currentChanged(const QModelIndex ¤t, c { Q_UNUSED(current) Q_UNUSED(previous) - auto id = kristall::identities.getIdentity(current); + auto id = kristall::globals().identities.getIdentity(current); this->ui->use_selected_cert->setEnabled(id.isValid()); } @@ -103,7 +103,7 @@ void CertificateSelectionDialog::on_create_new_cert_clicked() return; id.is_persistent = true; - kristall::identities.addCertificate( + kristall::globals().identities.addCertificate( dialog.groupName(), id); } @@ -111,7 +111,7 @@ void CertificateSelectionDialog::on_create_new_cert_clicked() void CertificateSelectionDialog::on_use_selected_cert_clicked() { auto sel = this->ui->certificates->selectionModel()->currentIndex(); - this->cryto_identity = kristall::identities.getIdentity(sel); + this->cryto_identity = kristall::globals().identities.getIdentity(sel); if(this->cryto_identity.isValid()) { this->accept(); } else { @@ -121,7 +121,7 @@ void CertificateSelectionDialog::on_use_selected_cert_clicked() void CertificateSelectionDialog::on_certificates_doubleClicked(const QModelIndex &index) { - this->cryto_identity = kristall::identities.getIdentity(index); + this->cryto_identity = kristall::globals().identities.getIdentity(index); if(this->cryto_identity.isValid()) { this->accept(); } else { |
