summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/adblock/adblockmanager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index bfdbd5ad..209c2ab0 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -66,6 +66,10 @@ void AdBlockManager::loadSettings()
filterList.clear();
+ // no need to load filters if adblock is not enabled :)
+ if(!_isAdblockEnabled)
+ return;
+
QMap<QString,QString> entryMap = cg.entryMap();
QMap<QString,QString>::ConstIterator it;
for( it = entryMap.constBegin(); it != entryMap.constEnd(); ++it )
@@ -93,13 +97,12 @@ QNetworkReply *AdBlockManager::block(const QNetworkRequest &request)
return 0;
QString urlString = request.url().toString();
- kDebug() << "****************************** ADBLOCK: Matching url: "<< urlString;
foreach(const AdBlockRule &filter, filterList)
{
if(filter.match(urlString))
{
- kDebug() << "****ADBLOCK: Matched: **************************";
+ kDebug() << "****ADBLOCK: Matched: ***********" << urlString;
AdBlockNetworkReply *reply = new AdBlockNetworkReply(request, urlString, this);
return reply;
}