aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/keypair_details/KeyPairSubkeyTab.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-11-28 04:35:01 +0000
committerSaturneric <[email protected]>2021-11-28 04:35:01 +0000
commitb5b3ba7b1dc52a8dbae2a3a6970b44ede827f060 (patch)
tree7dffd4f4e6684d078616d88999590b95e8a56410 /src/ui/keypair_details/KeyPairSubkeyTab.cpp
parentUI Framework Modified. (diff)
downloadGpgFrontend-b5b3ba7b1dc52a8dbae2a3a6970b44ede827f060.tar.gz
GpgFrontend-b5b3ba7b1dc52a8dbae2a3a6970b44ede827f060.zip
Can be compiled with minimal UI support.
Diffstat (limited to '')
-rw-r--r--src/ui/keypair_details/KeyPairSubkeyTab.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/ui/keypair_details/KeyPairSubkeyTab.cpp b/src/ui/keypair_details/KeyPairSubkeyTab.cpp
index 84d9f558..a56885d1 100644
--- a/src/ui/keypair_details/KeyPairSubkeyTab.cpp
+++ b/src/ui/keypair_details/KeyPairSubkeyTab.cpp
@@ -28,8 +28,7 @@
namespace GpgFrontend::UI {
KeyPairSubkeyTab::KeyPairSubkeyTab(const std::string& key_id, QWidget* parent)
- : mKey(std::move(GpgKeyGetter::GetInstance().GetKey(key_id))),
- QWidget(parent) {
+ : QWidget(parent), mKey(GpgKeyGetter::GetInstance().GetKey(key_id)) {
createSubkeyList();
createSubkeyOperaMenu();
@@ -179,7 +178,7 @@ void KeyPairSubkeyTab::slotRefreshSubkeyList() {
}
void KeyPairSubkeyTab::slotAddSubkey() {
- auto dialog = new SubkeyGenerateDialog(mKey, this);
+ auto dialog = new SubkeyGenerateDialog(mKey.id(), this);
dialog->show();
}
@@ -252,12 +251,9 @@ void KeyPairSubkeyTab::createSubkeyOperaMenu() {
}
void KeyPairSubkeyTab::slotEditSubkey() {
- qDebug() << "Slot Edit Subkry";
- auto subkey_id = std::make_unique<std::string>(getSelectedSubkey().id());
- if (*subkey_id == buffered_subkeys[0].id()) {
- subkey_id = nullptr;
- }
- auto dialog = new KeySetExpireDateDialog(mKey, subkey_id, this);
+ qDebug() << "Slot Edit Subkey";
+ auto dialog =
+ new KeySetExpireDateDialog(mKey.id(), getSelectedSubkey().id(), this);
dialog->show();
}