aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/ADSKsPicker.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-12 14:00:42 +0000
committersaturneric <[email protected]>2025-04-12 14:00:42 +0000
commit1f393a50c60d94a4ae23875b31e0e07ad3d64375 (patch)
treee4e4597dfca48a38c73779fe577e22e3550ee993 /src/ui/dialog/ADSKsPicker.cpp
parentfix: avoid accessing invalid pointers of structs related to gpgme_key (diff)
downloadGpgFrontend-1f393a50c60d94a4ae23875b31e0e07ad3d64375.tar.gz
GpgFrontend-1f393a50c60d94a4ae23875b31e0e07ad3d64375.zip
fix: issues on adsk operations
Diffstat (limited to '')
-rw-r--r--src/ui/dialog/ADSKsPicker.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/dialog/ADSKsPicker.cpp b/src/ui/dialog/ADSKsPicker.cpp
index a3589a91..f10a936a 100644
--- a/src/ui/dialog/ADSKsPicker.cpp
+++ b/src/ui/dialog/ADSKsPicker.cpp
@@ -34,15 +34,14 @@
namespace GpgFrontend::UI {
ADSKsPicker::ADSKsPicker(int channel,
- const GpgKeyTreeModel::Detector& enable_detector,
+ const GpgKeyTreeProxyModel::KeyFilter& filter,
QWidget* parent)
: GeneralDialog(typeid(ADSKsPicker).name(), parent),
tree_view_(new KeyTreeView(
channel, [](GpgAbstractKey* k) { return k->IsSubKey(); },
- [=](GpgAbstractKey* k) {
- return (!k->IsSubKey() || (k->IsSubKey() && !k->IsPrimaryKey() &&
- k->IsHasEncrCap())) &&
- enable_detector(k);
+ [=](const GpgAbstractKey* k) {
+ return (!k->IsSubKey() || (k->IsSubKey() && k->IsHasEncrCap())) &&
+ filter(k);
})) {
auto* confirm_button = new QPushButton(tr("Confirm"));
auto* cancel_button = new QPushButton(tr("Cancel"));
@@ -77,7 +76,7 @@ ADSKsPicker::ADSKsPicker(int channel,
this->setWindowTitle(tr("ADSKs Picker"));
movePosition2CenterOfParent();
-
+
this->show();
this->raise();
this->activateWindow();