summaryrefslogtreecommitdiff
path: root/src/adblock
diff options
context:
space:
mode:
Diffstat (limited to 'src/adblock')
-rw-r--r--src/adblock/adblockhostmatcher.cpp7
-rw-r--r--src/adblock/adblockhostmatcher.h3
-rw-r--r--src/adblock/adblockmanager.cpp2
-rw-r--r--src/adblock/adblockmanager.h2
4 files changed, 8 insertions, 6 deletions
diff --git a/src/adblock/adblockhostmatcher.cpp b/src/adblock/adblockhostmatcher.cpp
index 60936ec0..4a1ea443 100644
--- a/src/adblock/adblockhostmatcher.cpp
+++ b/src/adblock/adblockhostmatcher.cpp
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010-2011 by Benjamin Poulain <ikipou at gmail dot com>
+* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -55,13 +56,13 @@ bool AdBlockHostMatcher::tryAddFilter(const QString &filter)
if (filter.startsWith(QL1S("@@")))
{
QString domain = filter.mid(2);
-
+
if (domain.contains(QL1C('^')))
return false;
if (domain.contains(QL1C('$')))
return false;
-
+
if (domain.contains(QL1C('*')))
return false;
@@ -77,6 +78,6 @@ bool AdBlockHostMatcher::tryAddFilter(const QString &filter)
m_hostList.insert(domain);
return true;
}
-
+
return false;
}
diff --git a/src/adblock/adblockhostmatcher.h b/src/adblock/adblockhostmatcher.h
index 79918239..9e1b68ef 100644
--- a/src/adblock/adblockhostmatcher.h
+++ b/src/adblock/adblockhostmatcher.h
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010-2011 by Benjamin Poulain <ikipou at gmail dot com>
+* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -48,7 +49,7 @@ public:
{
m_hostList.clear();
}
-
+
private:
QSet<QString> m_hostList;
};
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index d5a3e27c..f30a997c 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -243,7 +243,7 @@ bool AdBlockManager::blockRequest(const QNetworkRequest &request)
QStringList whiteRefererList = ReKonfig::whiteReferer();
const QString referer = request.rawHeader("referer");
- Q_FOREACH(const QString &host, whiteRefererList)
+ Q_FOREACH(const QString & host, whiteRefererList)
{
if (referer.contains(host))
return false;
diff --git a/src/adblock/adblockmanager.h b/src/adblock/adblockmanager.h
index 993fa9a7..7f044f3e 100644
--- a/src/adblock/adblockmanager.h
+++ b/src/adblock/adblockmanager.h
@@ -167,7 +167,7 @@ public:
void addCustomRule(const QString &, bool reloadPage = true);
bool isAdblockEnabledForHost(const QString &host);
-
+
private:
AdBlockManager(QObject *parent = 0);