From 7ca18eb0e2c4204f749c682b66c862968e8d2f58 Mon Sep 17 00:00:00 2001 From: saturneric Date: Sun, 13 Apr 2025 21:33:31 +0200 Subject: feat: add SmartCardController --- src/ui/widgets/KeyTreeView.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ui/widgets/KeyTreeView.cpp') 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::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) { -- cgit v1.2.3