aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/key_generate/SubkeyGenerateDialog.h3
-rw-r--r--src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp16
2 files changed, 8 insertions, 11 deletions
diff --git a/src/ui/dialog/key_generate/SubkeyGenerateDialog.h b/src/ui/dialog/key_generate/SubkeyGenerateDialog.h
index 96dee49e..1e37d6b5 100644
--- a/src/ui/dialog/key_generate/SubkeyGenerateDialog.h
+++ b/src/ui/dialog/key_generate/SubkeyGenerateDialog.h
@@ -28,12 +28,9 @@
#pragma once
-#include "core/function/gpg/GpgContext.h"
#include "core/model/GpgKey.h"
#include "core/model/GpgKeyGenerateInfo.h"
#include "core/typedef/GpgTypedef.h"
-#include "core/utils/MemoryUtils.h"
-#include "ui/GpgFrontendUI.h"
#include "ui/dialog/GeneralDialog.h"
class Ui_SubkeyGenDialog;
diff --git a/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp b/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
index 548b3473..88e313c4 100644
--- a/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
+++ b/src/ui/dialog/keypair_details/KeyPairSubkeyTab.cpp
@@ -306,14 +306,14 @@ void KeyPairSubkeyTab::slot_refresh_subkey_detail() {
QString buffer;
QTextStream usage_steam(&buffer);
- if (subkey.IsHasCertCap()) {
- usage_steam << tr("Certificate") << " ";
- }
- if (subkey.IsHasEncrCap()) usage_steam << tr("Encrypt") << " ";
- if (subkey.IsHasSignCap()) usage_steam << tr("Sign") << " ";
- if (subkey.IsHasAuthCap()) usage_steam << tr("Auth") << " ";
-
- usage_var_label_->setText(usage_steam.readAll());
+ if (subkey.IsHasCertCap()) usage_steam << "C";
+ if (subkey.IsHasEncrCap()) usage_steam << "E";
+ if (subkey.IsHasSignCap()) usage_steam << "S";
+ if (subkey.IsHasAuthCap()) usage_steam << "A";
+ if (subkey.IsADSK()) usage_steam << "R";
+
+ const auto usage = usage_steam.readAll();
+ usage_var_label_->setText(usage.isEmpty() ? "/" : usage);
// Show the situation that secret key not exists.
master_key_exist_var_label_->setText(subkey.IsSecretKey() ? tr("Exists")