aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/function/SetOwnerTrustLevel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/function/SetOwnerTrustLevel.cpp')
-rw-r--r--src/ui/function/SetOwnerTrustLevel.cpp13
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