summaryrefslogtreecommitdiff
path: root/src/adblock/adblockmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/adblock/adblockmanager.cpp')
-rw-r--r--src/adblock/adblockmanager.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index 4f4cff51..bfdbd5ad 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -30,7 +30,6 @@
// Local Includes
#include "adblocknetworkreply.h"
-#include "adblockrule.h"
// KDE Includes
#include <KSharedConfig>
@@ -76,7 +75,8 @@ void AdBlockManager::loadSettings()
if (name.startsWith(QLatin1String("Filter")))
{
- filterList << url;
+ AdBlockRule filter(url);
+ filterList << filter;
}
}
}
@@ -95,30 +95,14 @@ QNetworkReply *AdBlockManager::block(const QNetworkRequest &request)
QString urlString = request.url().toString();
kDebug() << "****************************** ADBLOCK: Matching url: "<< urlString;
- foreach(const QString &filter, filterList)
+ foreach(const AdBlockRule &filter, filterList)
{
- AdBlockRule rule(filter);
- if(rule.match(urlString))
+ if(filter.match(urlString))
{
kDebug() << "****ADBLOCK: Matched: **************************";
AdBlockNetworkReply *reply = new AdBlockNetworkReply(request, urlString, this);
return reply;
}
}
-
-
-
- // Check the blacklist, and only if that matches, the whitelist
-
-
-
-
-
-// if(_adBlackList.isUrlMatched(urlString) && !_adWhiteList.isUrlMatched(urlString))
-// {
-// kDebug() << "****ADBLOCK: Matched: **************************";
-// AdBlockNetworkReply *reply = new AdBlockNetworkReply(request, urlString, this);
-// return reply;
-// }
return 0;
}