diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-10-18 23:39:28 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-10-19 00:30:13 +0200 |
commit | 5f623dcfc8f02504d745f47f8b9274b2bca5fd67 (patch) | |
tree | f7d6719f6c48c6c038e41631727ccc2ea3368461 /lib/urlfilter/formats/adblockrule.cpp | |
parent | urlfilter: add Domain class (diff) | |
download | smolbote-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.cpp | 4 |
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)); |