summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-07-06 19:49:01 +0200
committerMontel Laurent <[email protected]>2017-07-06 19:49:01 +0200
commit80ea62241687c5a45721f2b585ca6f4ad0b9d22c (patch)
tree4db7e20bd131d340f1e49f29f6b748fc0e33e0c5
parent854fa8b5cb57612f394a188602faa268524dc657 (diff)
Port to nullptr
-rw-r--r--plugins/webengineurlinterceptor/adblock/lib/adblocksearchtree.cpp8
-rw-r--r--plugins/webengineurlinterceptor/adblock/lib/adblocksubscription.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/webengineurlinterceptor/adblock/lib/adblocksearchtree.cpp b/plugins/webengineurlinterceptor/adblock/lib/adblocksearchtree.cpp
index 3616147..d13ea1d 100644
--- a/plugins/webengineurlinterceptor/adblock/lib/adblocksearchtree.cpp
+++ b/plugins/webengineurlinterceptor/adblock/lib/adblocksearchtree.cpp
@@ -108,13 +108,13 @@ const AdBlockRule *AdBlockSearchTree::find(const QWebEngineUrlRequestInfo &reque
const AdBlockRule *AdBlockSearchTree::prefixSearch(const QWebEngineUrlRequestInfo &request, const QString &domain, const QString &urlString, const QChar *string, int len) const
{
if (len <= 0) {
- return 0;
+ return nullptr;
}
QChar c = string[0];
if (!m_root->children.contains(c)) {
- return 0;
+ return nullptr;
}
Node *node = m_root->children[c];
@@ -127,7 +127,7 @@ const AdBlockRule *AdBlockSearchTree::prefixSearch(const QWebEngineUrlRequestInf
}
if (!node->children.contains(c)) {
- return 0;
+ return nullptr;
}
node = node->children[c];
@@ -137,7 +137,7 @@ const AdBlockRule *AdBlockSearchTree::prefixSearch(const QWebEngineUrlRequestInf
return node->rule;
}
- return 0;
+ return nullptr;
}
void AdBlockSearchTree::deleteNode(AdBlockSearchTree::Node *node)
diff --git a/plugins/webengineurlinterceptor/adblock/lib/adblocksubscription.cpp b/plugins/webengineurlinterceptor/adblock/lib/adblocksubscription.cpp
index fee4de4..c3e3573 100644
--- a/plugins/webengineurlinterceptor/adblock/lib/adblocksubscription.cpp
+++ b/plugins/webengineurlinterceptor/adblock/lib/adblocksubscription.cpp
@@ -251,7 +251,7 @@ QVector<AdBlockRule *> AdBlockSubscription::allRules() const
const AdBlockRule *AdBlockSubscription::enableRule(int offset)
{
if (!AdblockUtil::containsIndex(m_rules, offset)) {
- return 0;
+ return nullptr;
}
AdBlockRule *rule = m_rules[offset];
@@ -270,7 +270,7 @@ const AdBlockRule *AdBlockSubscription::enableRule(int offset)
const AdBlockRule *AdBlockSubscription::disableRule(int offset)
{
if (!AdblockUtil::containsIndex(m_rules, offset)) {
- return 0;
+ return nullptr;
}
AdBlockRule *rule = m_rules[offset];
@@ -312,7 +312,7 @@ const AdBlockRule *AdBlockSubscription::replaceRule(AdBlockRule *rule, int offse
{
Q_UNUSED(rule)
Q_UNUSED(offset)
- return 0;
+ return nullptr;
}
AdBlockSubscription::~AdBlockSubscription()
@@ -459,7 +459,7 @@ bool AdBlockCustomList::removeRule(int offset)
const AdBlockRule *AdBlockCustomList::replaceRule(AdBlockRule *rule, int offset)
{
if (!AdblockUtil::containsIndex(m_rules, offset)) {
- return 0;
+ return nullptr;
}
AdBlockRule *oldRule = m_rules.at(offset);