#include "adblockrule.h" AdBlockRule::AdBlockRule(QString rule, QObject *parent) : QObject(parent) { ruleExpression.setPattern(rule); } bool AdBlockRule::match(const QUrl &url) { return ruleExpression.match(url.toString()).hasMatch(); }