From f7a00c58d2824f49ecaafc0152fc0b8213772e46 Mon Sep 17 00:00:00 2001 From: saturneric Date: Fri, 13 Dec 2024 16:22:33 +0100 Subject: refactor: using qt containers instead of std containers --- src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 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 e079e683..35f4e57f 100644 --- a/src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp +++ b/src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp @@ -108,14 +108,14 @@ void KeyUIDSignDialog::slot_sign_key(bool clicked) { auto key_ids = m_key_list_->GetChecked(); auto keys = GpgKeyGetter::GetInstance(current_gpg_context_channel_).GetKeys(key_ids); - assert(std::all_of(keys->begin(), keys->end(), + assert(std::all_of(keys.begin(), keys.end(), [](const auto& key) { return key.IsGood(); })); auto expires = std::make_unique(expires_edit_->dateTime()); // Sign For mKey if (!GpgKeyManager::GetInstance(current_gpg_context_channel_) - .SignKey(m_key_, *keys, m_uid_, expires)) { + .SignKey(m_key_, keys, m_uid_, expires)) { QMessageBox::critical( nullptr, tr("Unsuccessful Operation"), tr("Signature operation failed for UID %1").arg(m_uid_)); -- cgit v1.2.3 From 39387a78e2e056fa946f92ec7509ef73ad3ecfa3 Mon Sep 17 00:00:00 2001 From: saturneric Date: Sun, 2 Feb 2025 21:03:21 +0100 Subject: refactor: make some function names shorter --- src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 35f4e57f..4b9d4726 100644 --- a/src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp +++ b/src/ui/dialog/keypair_details/KeyUIDSignDialog.cpp @@ -52,7 +52,7 @@ KeyUIDSignDialog::KeyUIDSignDialog(int channel, const GpgKey& key, m_key_list_->AddListGroupTab( tr("Signers"), "signers", GpgKeyTableDisplayMode::kPRIVATE_KEY, [key_id](const GpgKey& key) -> bool { - return !(key.IsDisabled() || !key.IsHasCertificationCapability() || + return !(key.IsDisabled() || !key.IsHasCertCap() || !key.IsHasMasterKey() || key.IsExpired() || key.IsRevoked() || key_id == key.GetId()); }); -- cgit v1.2.3