From 85900021a041818ecf2415f5925fcc2a5aa5e7a4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 20 Nov 2009 02:27:17 +0100 Subject: AdBlock. First blocks :D --- src/webpage.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/webpage.cpp') diff --git a/src/webpage.cpp b/src/webpage.cpp index 94ecbe09..9803d8a3 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -69,6 +69,7 @@ WebPage::WebPage(QObject *parent, qlonglong windowId) : KWebPage(parent, windowId) , m_keyboardModifiers(Qt::NoModifier) , m_pressedButtons(Qt::NoButton) + , m_adBlockMan(new AdBlockManager(this)) { setPluginFactory(new WebPluginFactory(this)); @@ -252,7 +253,5 @@ QString WebPage::errorPage(QNetworkReply *reply) bool WebPage::authorizedRequest(const QUrl &url) const { - Q_UNUSED(url) - // TODO implement ad-block here - return true; + return m_adBlockMan->isUrlAllowed(url); } -- cgit v1.2.1