diff options
author | saturneric <[email protected]> | 2025-04-15 23:19:53 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-04-15 23:19:53 +0000 |
commit | 73a0f7ddf8a8db0057201374f1518d2063ad9a06 (patch) | |
tree | 4dfdf140fa639f0ab8799433c4d9cf5079a92bf0 /src/ui/function/SetOwnerTrustLevel.cpp | |
parent | refactor: code cleanup (diff) | |
download | GpgFrontend-73a0f7ddf8a8db0057201374f1518d2063ad9a06.tar.gz GpgFrontend-73a0f7ddf8a8db0057201374f1518d2063ad9a06.zip |
feat: support key groups
Diffstat (limited to 'src/ui/function/SetOwnerTrustLevel.cpp')
-rw-r--r-- | src/ui/function/SetOwnerTrustLevel.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
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 |