mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
1043f9f803
* refactor: remove unnecessary includes in headers * fix: formatting * chore: changelog * fix: scrollbar * fix: suggestions and old appbase remains * fix: suggestion * fix: missing Qt forward declarations * fix: another qt include * fix: includes for precompiled-headers=off * Add missing `<memory>` includes * Add missing `#pragma once` * Fix tests Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
34 lines
776 B
C++
34 lines
776 B
C++
#pragma once
|
|
|
|
#include "messages/search/MessagePredicate.hpp"
|
|
|
|
#include <QString>
|
|
|
|
namespace chatterino {
|
|
|
|
/**
|
|
* @brief MessagePredicate checking whether a link exists in the message.
|
|
*
|
|
* This predicate will only allow messages that contain a link.
|
|
*/
|
|
class LinkPredicate : public MessagePredicate
|
|
{
|
|
public:
|
|
/**
|
|
* @brief Create an LinkPredicate
|
|
*
|
|
* @param negate when set, excludes messages containing links from results
|
|
*/
|
|
LinkPredicate(bool negate);
|
|
|
|
protected:
|
|
/**
|
|
* @brief Checks whether the message contains a link.
|
|
*
|
|
* @param message the message to check
|
|
* @return true if the message contains a link, false otherwise
|
|
*/
|
|
bool appliesToImpl(const Message &message) override;
|
|
};
|
|
|
|
} // namespace chatterino
|