diff options
author | saturneric <[email protected]> | 2024-10-26 13:43:14 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-10-26 13:43:14 +0000 |
commit | 24c28eb752aa611dd1670f3fa7ab6b358b052f1b (patch) | |
tree | 6a4f9af003fa4a86b7d7e29a965e37a231951092 /src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp | |
parent | fix: thread concurrent crash issue (diff) | |
download | GpgFrontend-24c28eb752aa611dd1670f3fa7ab6b358b052f1b.tar.gz GpgFrontend-24c28eb752aa611dd1670f3fa7ab6b358b052f1b.zip |
fix: test basic operations of multi key db and solve issues
Diffstat (limited to 'src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp')
-rw-r--r-- | src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp b/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp index 71b7647f..71963f99 100644 --- a/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp +++ b/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp @@ -37,23 +37,29 @@ namespace GpgFrontend::UI { -KeySetExpireDateDialog::KeySetExpireDateDialog(const KeyId& key_id, +KeySetExpireDateDialog::KeySetExpireDateDialog(int channel, const KeyId& key_id, QWidget* parent) : GeneralDialog(typeid(KeySetExpireDateDialog).name(), parent), ui_(GpgFrontend::SecureCreateSharedObject< Ui_ModifiedExpirationDateTime>()), - m_key_(GpgKeyGetter::GetInstance().GetKey(key_id)) { + current_gpg_context_channel_(channel), + m_key_(GpgKeyGetter::GetInstance(current_gpg_context_channel_) + .GetKey(key_id)) { + assert(m_key_.IsGood()); init(); } -KeySetExpireDateDialog::KeySetExpireDateDialog(const KeyId& key_id, +KeySetExpireDateDialog::KeySetExpireDateDialog(int channel, const KeyId& key_id, QString subkey_fpr, QWidget* parent) : GeneralDialog(typeid(KeySetExpireDateDialog).name(), parent), ui_(GpgFrontend::SecureCreateSharedObject< Ui_ModifiedExpirationDateTime>()), - m_key_(GpgKeyGetter::GetInstance().GetKey(key_id)), + current_gpg_context_channel_(channel), + m_key_(GpgKeyGetter::GetInstance(current_gpg_context_channel_) + .GetKey(key_id)), m_subkey_(std::move(subkey_fpr)) { + assert(m_key_.IsGood()); init(); } |