summaryrefslogtreecommitdiff
path: root/src/adblock/adblockruletextmatchimpl.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-17 16:46:24 +0200
commit82167d2422a4b6e3071dca68cf65a66e1da41ab4 (patch)
tree03c1f95a2aa60c48822a463cc3812b5c3415991e /src/adblock/adblockruletextmatchimpl.cpp
parentImproving tab previews (diff)
downloadrekonq-82167d2422a4b6e3071dca68cf65a66e1da41ab4.tar.xz
A round of the "new" astyle 2.01...
Diffstat (limited to 'src/adblock/adblockruletextmatchimpl.cpp')
-rw-r--r--src/adblock/adblockruletextmatchimpl.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/adblock/adblockruletextmatchimpl.cpp b/src/adblock/adblockruletextmatchimpl.cpp
index f3f93204..70b5d03d 100644
--- a/src/adblock/adblockruletextmatchimpl.cpp
+++ b/src/adblock/adblockruletextmatchimpl.cpp
@@ -35,7 +35,7 @@
AdBlockRuleTextMatchImpl::AdBlockRuleTextMatchImpl(const QString &filter)
- : AdBlockRuleImpl(filter)
+ : AdBlockRuleImpl(filter)
{
Q_ASSERT(AdBlockRuleTextMatchImpl::isTextMatchFilter(filter));
@@ -46,10 +46,10 @@ 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...
+ // this basically lets the "first request" to pass...
if(!request.hasRawHeader("referer"))
return false;
-
+
Q_UNUSED(encodedUrl);
// Case sensitive compare is faster, but would be incorrect with encodedUrl since
// we do want case insensitive.
@@ -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);
}