diff options
Diffstat (limited to 'src/adblock/adblockrule.cpp')
-rw-r--r-- | src/adblock/adblockrule.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/adblock/adblockrule.cpp b/src/adblock/adblockrule.cpp index 8236f920..1cb6773a 100644 --- a/src/adblock/adblockrule.cpp +++ b/src/adblock/adblockrule.cpp @@ -56,8 +56,12 @@ #include "adblockrule.h" #include "adblockrulefallbackimpl.h" +#include "adblockruletextmatchimpl.h" AdBlockRule::AdBlockRule(const QString &filter) { - m_implementation = QSharedPointer<AdBlockRuleImpl>(new AdBlockRuleFallbackImpl(filter)); + if (AdBlockRuleTextMatchImpl::isTextMatchFilter(filter)) + m_implementation = QSharedPointer<AdBlockRuleImpl>(new AdBlockRuleTextMatchImpl(filter)); + else + m_implementation = QSharedPointer<AdBlockRuleImpl>(new AdBlockRuleFallbackImpl(filter)); } |