diff options
-rw-r--r-- | src/core/model/GpgKeyTableProxyModel.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/model/GpgKeyTableProxyModel.cpp b/src/core/model/GpgKeyTableProxyModel.cpp index 5ed9ade3..aa5cc4b1 100644 --- a/src/core/model/GpgKeyTableProxyModel.cpp +++ b/src/core/model/GpgKeyTableProxyModel.cpp @@ -83,12 +83,17 @@ auto GpgKeyTableProxyModel::filterAcceptsRow( for (int column = 0; column < sourceModel()->columnCount(); ++column) { auto index = sourceModel()->index(source_row, column, sourceParent); infos << sourceModel()->data(index).toString(); - } - for (const QString &info : infos) { - if (info.contains(filter_keywords_, Qt::CaseInsensitive)) return true; + const auto uids = key.GetUIDs(); + for (const auto &uid : *uids) { + infos << uid.GetUID(); + } } + return std::any_of(infos.cbegin(), infos.cend(), [&](const QString &info) { + return info.contains(filter_keywords_, Qt::CaseInsensitive); + }); + return false; } |