diff options
author | saturneric <[email protected]> | 2024-01-25 17:24:23 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-25 17:24:23 +0000 |
commit | f604b865cc119717e3dbe4296f20f9b3db0a1c87 (patch) | |
tree | 59992c5fd165e40206d964f490e6874cd6c73c8c /src/ui/widgets/KeyList.cpp | |
parent | feat: enhance analysed results of verification and signing (diff) | |
download | GpgFrontend-f604b865cc119717e3dbe4296f20f9b3db0a1c87.tar.gz GpgFrontend-f604b865cc119717e3dbe4296f20f9b3db0a1c87.zip |
feat: enhance keys searching functions
Diffstat (limited to '')
-rw-r--r-- | src/ui/widgets/KeyList.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/ui/widgets/KeyList.cpp b/src/ui/widgets/KeyList.cpp index a9c8e38f..48c99269 100644 --- a/src/ui/widgets/KeyList.cpp +++ b/src/ui/widgets/KeyList.cpp @@ -579,12 +579,16 @@ void KeyTable::Refresh(KeyLinkListPtr m_keys) { while (it != keys->end()) { // filter by search bar's keyword if (ability_ & KeyMenuAbility::SEARCH_BAR && !keyword_.isEmpty()) { - auto name = it->GetName().toLower(); - auto email = it->GetEmail().toLower(); - auto comment = it->GetComment().toLower(); + QStringList infos; + infos << it->GetName().toLower() << it->GetEmail().toLower() + << it->GetComment().toLower() << it->GetFingerprint().toLower(); - if (!name.contains(keyword_) && !email.contains(keyword_) && - !comment.contains(keyword_)) { + auto subkeys = it->GetSubKeys(); + for (const auto& subkey : *subkeys) { + infos << subkey.GetFingerprint().toLower() << subkey.GetID().toLower(); + } + + if (infos.filter(keyword_.toLower()).isEmpty()) { it = keys->erase(it); continue; } |