aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
diff options
context:
space:
mode:
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() {