diff options
author | saturneric <[email protected]> | 2024-10-26 14:20:13 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-10-26 14:20:13 +0000 |
commit | aa90cf1eb97e39f99e622753bb0624ed8dff7775 (patch) | |
tree | ec2f334903f4d8e9a179dc88d46911a649c02c7d /src/ui/dialog/keypair_details/KeyPairUIDTab.cpp | |
parent | fix: should check key status immediately after get it (diff) | |
download | GpgFrontend-aa90cf1eb97e39f99e622753bb0624ed8dff7775.tar.gz GpgFrontend-aa90cf1eb97e39f99e622753bb0624ed8dff7775.zip |
fix: should select channel before any gpg operation
Diffstat (limited to 'src/ui/dialog/keypair_details/KeyPairUIDTab.cpp')
-rw-r--r-- | src/ui/dialog/keypair_details/KeyPairUIDTab.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ui/dialog/keypair_details/KeyPairUIDTab.cpp b/src/ui/dialog/keypair_details/KeyPairUIDTab.cpp index 4846f58a..87f5e10e 100644 --- a/src/ui/dialog/keypair_details/KeyPairUIDTab.cpp +++ b/src/ui/dialog/keypair_details/KeyPairUIDTab.cpp @@ -389,7 +389,8 @@ void KeyPairUIDTab::slot_del_uid() { if (ret == QMessageBox::Yes) { for (const auto& uid : *selected_uids) { - if (!GpgUIDOperator::GetInstance().RevUID(m_key_, uid)) { + if (!GpgUIDOperator::GetInstance(current_gpg_context_channel_) + .RevUID(m_key_, uid)) { QMessageBox::critical( nullptr, tr("Operation Failed"), tr("An error occurred during the delete %1 operation.").arg(uid)); @@ -423,8 +424,8 @@ void KeyPairUIDTab::slot_set_primary_uid() { QMessageBox::No | QMessageBox::Yes); if (ret == QMessageBox::Yes) { - if (!GpgUIDOperator::GetInstance().SetPrimaryUID(m_key_, - selected_uids->front())) { + if (!GpgUIDOperator::GetInstance(current_gpg_context_channel_) + .SetPrimaryUID(m_key_, selected_uids->front())) { QMessageBox::critical(nullptr, tr("Operation Failed"), tr("An error occurred during the operation.")); } else { @@ -520,7 +521,8 @@ void KeyPairUIDTab::slot_del_uid_single() { QMessageBox::No | QMessageBox::Yes); if (ret == QMessageBox::Yes) { - if (!GpgUIDOperator::GetInstance().RevUID(m_key_, selected_uids->front())) { + if (!GpgUIDOperator::GetInstance(current_gpg_context_channel_) + .RevUID(m_key_, selected_uids->front())) { QMessageBox::critical(nullptr, tr("Operation Failed"), tr("An error occurred during the operation.")); } else { @@ -572,7 +574,8 @@ void KeyPairUIDTab::slot_del_sign() { QMessageBox::No | QMessageBox::Yes); if (ret == QMessageBox::Yes) { - if (!GpgKeyManager::GetInstance().RevSign(m_key_, selected_signs)) { + if (!GpgKeyManager::GetInstance(current_gpg_context_channel_) + .RevSign(m_key_, selected_signs)) { QMessageBox::critical(nullptr, tr("Operation Failed"), tr("An error occurred during the operation.")); } |