aboutsummaryrefslogtreecommitdiff
path: root/lib/urlfilter
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2019-01-18 16:56:54 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2019-01-18 16:56:54 +0100
commit9e73d0dac0774955348a5164087363c5b33927b8 (patch)
tree61eb5d729c4e48e1fabe596f387a3e67a1d1d415 /lib/urlfilter
parentRewrite lib/web to lib/webprofile (diff)
downloadsmolbote-9e73d0dac0774955348a5164087363c5b33927b8.tar.xz
Add tools/report-clang-tidy.sh
- Fix various clang-tidy warnings - Fix use-after-free crash when deleting profiles
Diffstat (limited to 'lib/urlfilter')
-rw-r--r--lib/urlfilter/hostlist/hostlist.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/urlfilter/hostlist/hostlist.cpp b/lib/urlfilter/hostlist/hostlist.cpp
index ec0b214..ff652cf 100644
--- a/lib/urlfilter/hostlist/hostlist.cpp
+++ b/lib/urlfilter/hostlist/hostlist.cpp
@@ -62,11 +62,11 @@ void HostList::parseLine(const QString& line)
return;
const QStringList parts = parsedLine.split(QLatin1Literal(" "));
- const QString redirect = parts.at(0);
+ const QString &redirect = parts.at(0);
const auto action = (redirect == QLatin1Literal("0.0.0.0")) ? UrlFilter::Block : UrlFilter::Redirect;
for(int i = 1; i < parts.size(); i++) {
- const QString domain = parts.at(i);
+ const QString &domain = parts.at(i);
Rule r;
r.action = action;
r.domainHash = qHash(domain);