summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heinecke <aheinecke@intevation.de>2016-08-04 15:34:21 (GMT)
committerAndre Heinecke <aheinecke@intevation.de>2016-08-04 15:34:21 (GMT)
commit95d5051c1ef42c27c665369f48048e02a4c61f91 (patch)
tree35ba611172b351686a97146d6151442ddda9ec05
parentb3b0c02117307716a9db5c35bdcd92f9056b2a01 (diff)
Make keyFilter mechanism work again
Accidentally got broken with 69fa5635 as it always returned the value based on the string filter
-rw-r--r--src/models/keylistsortfilterproxymodel.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/models/keylistsortfilterproxymodel.cpp b/src/models/keylistsortfilterproxymodel.cpp
index 6d7a451..37d4076 100644
--- a/src/models/keylistsortfilterproxymodel.cpp
+++ b/src/models/keylistsortfilterproxymodel.cpp
@@ -197,11 +197,10 @@ bool KeyListSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelI
Q_FOREACH(const auto uid, key.userIDs()) {
const auto name = QString::fromUtf8(uid.name());
const auto email = QString::fromUtf8(uid.email());
- if (name.contains(rx) || email.contains(rx)) {
- return true;
+ if (!name.contains(rx) && !email.contains(rx)) {
+ return false;
}
}
- return false;
}
//