From 73a0f7ddf8a8db0057201374f1518d2063ad9a06 Mon Sep 17 00:00:00 2001 From: saturneric Date: Wed, 16 Apr 2025 01:19:53 +0200 Subject: feat: support key groups --- src/ui/function/SetOwnerTrustLevel.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/ui/function/SetOwnerTrustLevel.cpp') diff --git a/src/ui/function/SetOwnerTrustLevel.cpp b/src/ui/function/SetOwnerTrustLevel.cpp index e99c3fa0..ed034250 100644 --- a/src/ui/function/SetOwnerTrustLevel.cpp +++ b/src/ui/function/SetOwnerTrustLevel.cpp @@ -28,8 +28,6 @@ #include "SetOwnerTrustLevel.h" -#include "core/GpgModel.h" -#include "core/function/gpg/GpgKeyGetter.h" #include "core/function/gpg/GpgKeyManager.h" #include "ui/UISignalStation.h" @@ -37,13 +35,8 @@ namespace GpgFrontend::UI { SetOwnerTrustLevel::SetOwnerTrustLevel(QWidget* parent) : QWidget(parent) {} -auto SetOwnerTrustLevel::Exec(int channel, const QString& key_id) -> bool { - if (key_id.isEmpty()) { - return false; - } - - auto key = GpgKeyGetter::GetInstance(channel).GetKey(key_id); - assert(key.IsGood()); +auto SetOwnerTrustLevel::Exec(int channel, const GpgKeyPtr& key) -> bool { + assert(key->IsGood()); QStringList items; @@ -52,7 +45,7 @@ auto SetOwnerTrustLevel::Exec(int channel, const QString& key_id) -> bool { bool ok; QString item = QInputDialog::getItem(this, tr("Modify Owner Trust Level"), tr("Trust for the Key Pair:"), items, - key.OwnerTrustLevel(), false, &ok); + key->OwnerTrustLevel(), false, &ok); if (ok && !item.isEmpty()) { int trust_level = 0; // Unknown Level -- cgit v1.2.3