Allow "field:query" in the quick filter bar

This commit is contained in:
Twan van Laarhoven
2020-04-27 01:22:40 +02:00
parent 1a39b85b73
commit 7ef0b885bb
6 changed files with 76 additions and 46 deletions
+5 -5
View File
@@ -73,11 +73,11 @@ void read_compat(Reader& handler, Keyword* k) {
}
}
bool Keyword::contains(String const& query) const {
if (find_i(keyword,query) != String::npos) return true;
if (find_i(rules,query) != String::npos) return true;
if (find_i(match,query) != String::npos) return true;
if (find_i(reminder.get(),query) != String::npos) return true;
bool Keyword::contains(QuickFilterPart const& query) const {
if (query.match(_("keyword"), keyword)) return true;
if (query.match(_("rules"), rules)) return true;
if (query.match(_("match"), match)) return true;
if (query.match(_("reminder"), reminder.get())) return true;
return false;
}