From 4dcd2ac8c4f673fc21c4cf0072d6cb648ca64e7e Mon Sep 17 00:00:00 2001 From: saturneric Date: Tue, 7 Nov 2023 15:57:28 +0800 Subject: refactor: separate typedef and impl --- src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp') diff --git a/src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp b/src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp index b2f5eb10..6afaa510 100644 --- a/src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp +++ b/src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp @@ -28,6 +28,7 @@ #include "KeyUIDSignDialog.h" +#include "core/GpgModel.h" #include "core/function/gpg/GpgKeyGetter.h" #include "core/function/gpg/GpgKeyManager.h" #include "ui/SignalStation.h" @@ -45,12 +46,9 @@ KeyUIDSignDialog::KeyUIDSignDialog(const GpgKey& key, UIDArgsListPtr uid, _("Signers"), "signers", KeyListRow::ONLY_SECRET_KEY, KeyListColumn::NAME | KeyListColumn::EmailAddress, [key_id](const GpgKey& key, const KeyTable&) -> bool { - if (key.IsDisabled() || !key.IsHasCertificationCapability() || - !key.IsHasMasterKey() || key.IsExpired() || key.IsRevoked() || - key_id == key.GetId()) - return false; - else - return true; + return !(key.IsDisabled() || !key.IsHasCertificationCapability() || + !key.IsHasMasterKey() || key.IsExpired() || key.IsRevoked() || + key_id == key.GetId()); }); m_key_list_->SlotRefresh(); -- cgit v1.2.3