aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-18 17:56:51 +0000
committersaturneric <[email protected]>2025-04-18 17:56:51 +0000
commita7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9 (patch)
tree54838273836a155033d33b246ec4a4200291825b /src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
parentfix: issues found by testing (diff)
parentfix: spelling mistake on project config by nightly build (diff)
downloadGpgFrontend-a7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9.tar.gz
GpgFrontend-a7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9.zip
Merge branch 'develop'
Diffstat (limited to 'src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp')
-rw-r--r--src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp b/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
index 73e7f4e5..64e4d029 100644
--- a/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
+++ b/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
@@ -31,7 +31,6 @@
#include "core/function/gpg/GpgKeyGetter.h"
#include "core/function/gpg/GpgKeyImportExporter.h"
#include "core/function/gpg/GpgKeyManager.h"
-#include "core/function/gpg/GpgKeyOpera.h"
#include "core/utils/CommonUtils.h"
#include "core/utils/GpgUtils.h"
#include "core/utils/IOUtils.h"
@@ -66,6 +65,11 @@ KeyPairSubkeyTab::KeyPairSubkeyTab(int channel, GpgKeyPtr key, QWidget* parent)
add_adsk_button->hide();
}
+ if (!CheckGpgVersion(channel, "2.4.1")) {
+ add_adsk_button->setDisabled(true);
+ add_adsk_button->hide();
+ }
+
uid_buttons_layout->addWidget(add_subkey_button, 0, 0);
uid_buttons_layout->addWidget(add_adsk_button, 0, 1);
@@ -277,9 +281,12 @@ void KeyPairSubkeyTab::slot_refresh_subkey_list() {
}
void KeyPairSubkeyTab::slot_add_subkey() {
- auto* dialog =
- new SubkeyGenerateDialog(current_gpg_context_channel_, key_, this);
- dialog->show();
+ if (!CheckGpgVersion(current_gpg_context_channel_, "2.2.0")) {
+ CommonUtils::RaiseMessageBoxNotSupported(this);
+ return;
+ }
+
+ new SubkeyGenerateDialog(current_gpg_context_channel_, key_, this);
}
void KeyPairSubkeyTab::slot_add_adsk() {