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/domain.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/domain.cpp')
-rw-r--r-- | lib/urlfilter/domain.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/urlfilter/domain.cpp b/lib/urlfilter/domain.cpp index 3686210..20c4f3a 100644 --- a/lib/urlfilter/domain.cpp +++ b/lib/urlfilter/domain.cpp @@ -8,26 +8,26 @@ #include "domain.h" -Domain::Domain(const QString& domain) +Domain::Domain(const QString &domain) : m_domain(domain) , m_hash(qHash(domain, 0)) { } -Domain::Domain(Domain && other) +Domain::Domain(Domain &&other) : m_domain(std::move(other.m_domain)) , m_hash(std::move(other.m_hash)) { } -Domain & Domain::operator=(Domain && other) +Domain &Domain::operator=(Domain &&other) { m_domain = std::move(other.m_domain); m_hash = other.m_hash; return *this; } -bool Domain::matches(const QUrl& url) const +bool Domain::matches(const QUrl &url) const { const QString domain = url.host(); |