aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/widgets/KeyTreeView.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-13 19:33:31 +0000
committersaturneric <[email protected]>2025-04-13 19:33:31 +0000
commit7ca18eb0e2c4204f749c682b66c862968e8d2f58 (patch)
treeba8e0303ebc6ec376b1be580408d9cd91f58f2d8 /src/ui/widgets/KeyTreeView.cpp
parentfeat: add openpgp smart card support (diff)
downloadGpgFrontend-7ca18eb0e2c4204f749c682b66c862968e8d2f58.tar.gz
GpgFrontend-7ca18eb0e2c4204f749c682b66c862968e8d2f58.zip
feat: add SmartCardController
Diffstat (limited to '')
-rw-r--r--src/ui/widgets/KeyTreeView.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/widgets/KeyTreeView.cpp b/src/ui/widgets/KeyTreeView.cpp
index 3df5a440..c0a00c4e 100644
--- a/src/ui/widgets/KeyTreeView.cpp
+++ b/src/ui/widgets/KeyTreeView.cpp
@@ -32,6 +32,7 @@
#include "core/function/gpg/GpgKeyGetter.h"
#include "core/utils/GpgUtils.h"
+#include "ui/UISignalStation.h"
#include "ui/dialog/keypair_details/KeyDetailsDialog.h"
#include "ui/model/GpgKeyTreeProxyModel.h"
@@ -121,6 +122,15 @@ void KeyTreeView::init() {
new KeyDetailsDialog(model_->GetGpgContextChannel(), key, this);
});
+
+ connect(UISignalStation::GetInstance(),
+ &UISignalStation::SignalKeyDatabaseRefresh, this, [=] {
+ model_ = QSharedPointer<GpgKeyTreeModel>::create(
+ channel_, GpgKeyGetter::GetInstance(channel_).FetchKey(),
+ [](auto) { return false; }, this);
+ proxy_model_.setSourceModel(model_.get());
+ proxy_model_.invalidate();
+ });
}
void KeyTreeView::SetKeyFilter(const GpgKeyTreeProxyModel::KeyFilter& filter) {