diff options
Diffstat (limited to 'src/ui/function')
-rw-r--r-- | src/ui/function/SetOwnerTrustLevel.cpp | 13 | ||||
-rw-r--r-- | src/ui/function/SetOwnerTrustLevel.h | 3 |
2 files changed, 5 insertions, 11 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 diff --git a/src/ui/function/SetOwnerTrustLevel.h b/src/ui/function/SetOwnerTrustLevel.h index ee2e98c8..00309f4d 100644 --- a/src/ui/function/SetOwnerTrustLevel.h +++ b/src/ui/function/SetOwnerTrustLevel.h @@ -29,6 +29,7 @@ #pragma once #include "GpgFrontendUI.h" +#include "core/typedef/GpgTypedef.h" namespace GpgFrontend::UI { @@ -49,7 +50,7 @@ class SetOwnerTrustLevel : public QWidget { * @return true * @return false */ - auto Exec(int channel, const QString& key_id) -> bool; + auto Exec(int channel, const GpgKeyPtr& key) -> bool; }; } // namespace GpgFrontend::UI
\ No newline at end of file |