aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-10-26 13:43:14 +0000
committersaturneric <[email protected]>2024-10-26 13:43:14 +0000
commit24c28eb752aa611dd1670f3fa7ab6b358b052f1b (patch)
tree6a4f9af003fa4a86b7d7e29a965e37a231951092 /src/ui/dialog/keypair_details/KeySetExpireDateDialog.cpp
parentfix: thread concurrent crash issue (diff)
downloadGpgFrontend-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.cpp14
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();
}