diff options
author | saturneric <[email protected]> | 2024-10-26 13:43:14 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-10-26 13:43:14 +0000 |
commit | 24c28eb752aa611dd1670f3fa7ab6b358b052f1b (patch) | |
tree | 6a4f9af003fa4a86b7d7e29a965e37a231951092 /src/ui/dialog/keypair_details/KeyDetailsDialog.cpp | |
parent | fix: thread concurrent crash issue (diff) | |
download | GpgFrontend-24c28eb752aa611dd1670f3fa7ab6b358b052f1b.tar.gz GpgFrontend-24c28eb752aa611dd1670f3fa7ab6b358b052f1b.zip |
fix: test basic operations of multi key db and solve issues
Diffstat (limited to 'src/ui/dialog/keypair_details/KeyDetailsDialog.cpp')
-rw-r--r-- | src/ui/dialog/keypair_details/KeyDetailsDialog.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/ui/dialog/keypair_details/KeyDetailsDialog.cpp b/src/ui/dialog/keypair_details/KeyDetailsDialog.cpp index 927a4553..2b2e73b2 100644 --- a/src/ui/dialog/keypair_details/KeyDetailsDialog.cpp +++ b/src/ui/dialog/keypair_details/KeyDetailsDialog.cpp @@ -36,19 +36,25 @@ #include "ui/dialog/keypair_details/KeyPairUIDTab.h" namespace GpgFrontend::UI { -KeyDetailsDialog::KeyDetailsDialog(const GpgKey& key, QWidget* parent) - : GeneralDialog(typeid(KeyDetailsDialog).name(), parent) { +KeyDetailsDialog::KeyDetailsDialog(int channel, const GpgKey& key, + QWidget* parent) + : GeneralDialog(typeid(KeyDetailsDialog).name(), parent), + current_gpg_context_channel_(channel) { tab_widget_ = new QTabWidget(); - tab_widget_->addTab(new KeyPairDetailTab(key.GetId(), tab_widget_), + tab_widget_->addTab(new KeyPairDetailTab(current_gpg_context_channel_, + key.GetId(), tab_widget_), tr("KeyPair")); if (!key.IsRevoked()) { - tab_widget_->addTab(new KeyPairUIDTab(key.GetId(), tab_widget_), + tab_widget_->addTab(new KeyPairUIDTab(current_gpg_context_channel_, + key.GetId(), tab_widget_), tr("UIDs")); - tab_widget_->addTab(new KeyPairSubkeyTab(key.GetId(), tab_widget_), + tab_widget_->addTab(new KeyPairSubkeyTab(current_gpg_context_channel_, + key.GetId(), tab_widget_), tr("Subkeys")); - tab_widget_->addTab(new KeyPairOperaTab(key.GetId(), tab_widget_), + tab_widget_->addTab(new KeyPairOperaTab(current_gpg_context_channel_, + key.GetId(), tab_widget_), tr("Operations")); } @@ -67,7 +73,8 @@ KeyDetailsDialog::KeyDetailsDialog(const GpgKey& key, QWidget* parent) this->setAttribute(Qt::WA_DeleteOnClose, true); this->setLayout(main_layout); - this->setWindowTitle(tr("Key Details")); + this->setWindowTitle(QString(tr("Key Details") + " (Key DB Index: %1)") + .arg(current_gpg_context_channel_)); this->setModal(true); this->show(); |