From b679535011c98e17c97c06c7079efb53f6d89769 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 2 Dec 2009 12:28:39 +0100 Subject: push startup on disabled adblock (don't load filters) --- src/adblock/adblockmanager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/adblock') 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 entryMap = cg.entryMap(); QMap::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; } -- cgit v1.2.1