feat: Allow negation of search predicates (#4207)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com> closes https://github.com/Chatterino/chatterino2/issues/3998
This commit is contained in:
@@ -16,10 +16,12 @@ public:
|
||||
/**
|
||||
* @brief Create an SubtierPredicate with a list of subtiers to search for.
|
||||
*
|
||||
* @param subtiers a list of subtiers that a message should contain
|
||||
* @param subtiers one or more comma-separated subtiers that the message should contain
|
||||
* @param negate when set, excludes messages containing selected subtiers from results
|
||||
*/
|
||||
SubtierPredicate(const QStringList &subtiers);
|
||||
SubtierPredicate(const QString &subtiers, bool negate);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Checks whether the message contains any of the subtiers passed
|
||||
* in the constructor.
|
||||
@@ -28,7 +30,7 @@ public:
|
||||
* @return true if the message contains a subtier listed in the specified subtiers,
|
||||
* false otherwise
|
||||
*/
|
||||
bool appliesTo(const Message &message) override;
|
||||
bool appliesToImpl(const Message &message) override;
|
||||
|
||||
private:
|
||||
/// Holds the subtiers that will be searched for
|
||||
|
||||
Reference in New Issue
Block a user