summaryrefslogtreecommitdiff
path: root/src/adblock/adblockruletextmatchimpl.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-25 19:48:41 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-25 19:48:41 +0200
commit14664e54b1a2dbe9c06f474a0918a262dba04e20 (patch)
tree2f48b455d90b5a966045f8ba6388ac8c0620259f /src/adblock/adblockruletextmatchimpl.cpp
parentLast SSL fixes (diff)
downloadrekonq-14664e54b1a2dbe9c06f474a0918a262dba04e20.tar.xz
clean up
- QL1S - one stupid kDebug less - codingstyle
Diffstat (limited to 'src/adblock/adblockruletextmatchimpl.cpp')
-rw-r--r--src/adblock/adblockruletextmatchimpl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/adblock/adblockruletextmatchimpl.cpp b/src/adblock/adblockruletextmatchimpl.cpp
index 70b5d03d..7b55bf27 100644
--- a/src/adblock/adblockruletextmatchimpl.cpp
+++ b/src/adblock/adblockruletextmatchimpl.cpp
@@ -47,7 +47,7 @@ AdBlockRuleTextMatchImpl::AdBlockRuleTextMatchImpl(const QString &filter)
bool AdBlockRuleTextMatchImpl::match(const QNetworkRequest &request, const QString &encodedUrl, const QString &encodedUrlLowerCase) const
{
// this basically lets the "first request" to pass...
- if(!request.hasRawHeader("referer"))
+ if (!request.hasRawHeader("referer"))
return false;
Q_UNUSED(encodedUrl);
@@ -62,22 +62,22 @@ bool AdBlockRuleTextMatchImpl::match(const QNetworkRequest &request, const QStri
bool AdBlockRuleTextMatchImpl::isTextMatchFilter(const QString &filter)
{
// We don't deal with options just yet
- if(filter.contains(QL1C('$')))
+ if (filter.contains(QL1C('$')))
return false;
// We don't deal with element matching
- if(filter.contains(QL1S("##")))
+ if (filter.contains(QL1S("##")))
return false;
// We don't deal with the begin-end matching
- if(filter.startsWith(QL1C('|')) || filter.endsWith(QL1C('|')))
+ if (filter.startsWith(QL1C('|')) || filter.endsWith(QL1C('|')))
return false;
// We only handle * at the beginning or the end
int starPosition = filter.indexOf(QL1C('*'));
- while(starPosition >= 0)
+ while (starPosition >= 0)
{
- if(starPosition != 0 && starPosition != (filter.length() - 1))
+ if (starPosition != 0 && starPosition != (filter.length() - 1))
return false;
starPosition = filter.indexOf(QL1C('*'), starPosition + 1);
}