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
+2 -3
View File
@@ -11,6 +11,7 @@
#include <util/prec.hpp>
#include <util/reflect.hpp>
#include <util/error.hpp>
#include <data/filter.hpp>
#include <data/field.hpp> // for Card::value
class Game;
@@ -61,9 +62,7 @@ class Card : public IntrusivePtrVirtualBase {
/** May return "" */
String identification() const;
/// Does any field contains the given query string?
bool contains(String const& query) const;
/// Does this card contain each of the words in the query string?
bool contains_words(String const& query) const;
bool contains(QuickFilterPart const& query) const;
/// Find a value in the data by name and type
template <typename T> T& value(const String& name) {