From 5f623dcfc8f02504d745f47f8b9274b2bca5fd67 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 18 Oct 2018 23:39:28 +0200 Subject: urlfilter: destroy FilterLeaves only when destroying the FilterTree Add QMutex lock when adding rules clang-format pass --- lib/urlfilter/domain.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/urlfilter/domain.cpp') 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(); -- cgit v1.2.1