aboutsummaryrefslogtreecommitdiff
path: root/lib/urlfilter/formats/adblockrule.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-10-18 23:39:28 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-10-19 00:30:13 +0200
commit5f623dcfc8f02504d745f47f8b9274b2bca5fd67 (patch)
treef7d6719f6c48c6c038e41631727ccc2ea3368461 /lib/urlfilter/formats/adblockrule.cpp
parenturlfilter: add Domain class (diff)
downloadsmolbote-5f623dcfc8f02504d745f47f8b9274b2bca5fd67.tar.xz
urlfilter: destroy FilterLeaves only when destroying the FilterTree
Add QMutex lock when adding rules clang-format pass
Diffstat (limited to 'lib/urlfilter/formats/adblockrule.cpp')
-rw-r--r--lib/urlfilter/formats/adblockrule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/urlfilter/formats/adblockrule.cpp b/lib/urlfilter/formats/adblockrule.cpp
index fc57ab9..c5d6b58 100644
--- a/lib/urlfilter/formats/adblockrule.cpp
+++ b/lib/urlfilter/formats/adblockrule.cpp
@@ -49,8 +49,8 @@ AdBlockRule::AdBlockRule(const QString &filter)
for(const QString &option : options) {
if(option.startsWith(QLatin1Literal("domain"))) {
const auto domainList = option.mid(7).split(QLatin1Literal("|"));
- for (const QString &domain : domainList) {
- if (domain.startsWith(QLatin1Literal("~"))) {
+ for(const QString &domain : domainList) {
+ if(domain.startsWith(QLatin1Literal("~"))) {
blockedDomains_hashes.append(qHash(domain.mid(1)));
} else {
allowedDomains_hashes.append(qHash(domain));