diff options
Diffstat (limited to 'src/adblock/adblockrule.h')
-rw-r--r-- | src/adblock/adblockrule.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/adblock/adblockrule.h b/src/adblock/adblockrule.h index 28084004..ef7b2f5f 100644 --- a/src/adblock/adblockrule.h +++ b/src/adblock/adblockrule.h @@ -58,27 +58,26 @@ // Rekonq Includes #include "rekonq_defines.h" -// Qt Includes -#include <QtCore/QRegExp> -#include <QtCore/QString> +#include "adblockruleimpl.h" -// Forward Includes -class QUrl; +#include <QSharedPointer> +// Forward Includes +class QString; class AdBlockRule { public: AdBlockRule(const QString &filter); - bool match(const QString &encodedUrl) const; - - QString pattern() const; + bool match(const QString &encodedUrl, const QString &encodedUrlLowerCase) const + { + Q_ASSERT(encodedUrl.toLower() == encodedUrlLowerCase); + return m_implementation->match(encodedUrl, encodedUrlLowerCase); + } private: - QString convertPatternToRegExp(const QString &wildcardPattern); - - QRegExp m_regExp; + QSharedPointer<AdBlockRuleImpl> m_implementation; }; |