mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Typo s/childs/children
This commit is contained in:
parent
3159407c18
commit
c07e9cff3c
@ -43,14 +43,14 @@ bool AdBlockSearchTree::add(const AdBlockRule* rule)
|
|||||||
|
|
||||||
for (int i = 0; i < len; ++i) {
|
for (int i = 0; i < len; ++i) {
|
||||||
const QChar &c = filter.at(i);
|
const QChar &c = filter.at(i);
|
||||||
if (!node->childs.contains(c)) {
|
if (!node->children.contains(c)) {
|
||||||
Node* n = new Node;
|
Node* n = new Node;
|
||||||
n->c = c;
|
n->c = c;
|
||||||
|
|
||||||
node->childs[c] = n;
|
node->children[c] = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = node->childs[c];
|
node = node->children[c];
|
||||||
}
|
}
|
||||||
|
|
||||||
node->rule = rule;
|
node->rule = rule;
|
||||||
@ -86,11 +86,11 @@ const AdBlockRule* AdBlockSearchTree::prefixSearch(const QNetworkRequest &reques
|
|||||||
|
|
||||||
QChar c = string.at(0);
|
QChar c = string.at(0);
|
||||||
|
|
||||||
if (!m_root->childs.contains(c)) {
|
if (!m_root->children.contains(c)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Node* node = m_root->childs[c];
|
Node* node = m_root->children[c];
|
||||||
|
|
||||||
for (int i = 1; i < len; ++i) {
|
for (int i = 1; i < len; ++i) {
|
||||||
const QChar &c = string.at(i);
|
const QChar &c = string.at(i);
|
||||||
@ -99,11 +99,11 @@ const AdBlockRule* AdBlockSearchTree::prefixSearch(const QNetworkRequest &reques
|
|||||||
return node->rule;
|
return node->rule;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!node->childs.contains(c)) {
|
if (!node->children.contains(c)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
node = node->childs[c];
|
node = node->children[c];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node->rule && node->rule->networkMatch(request, domain, urlString)) {
|
if (node->rule && node->rule->networkMatch(request, domain, urlString)) {
|
||||||
@ -119,7 +119,7 @@ void AdBlockSearchTree::deleteNode(AdBlockSearchTree::Node* node)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QHashIterator<QChar, Node*> i(node->childs);
|
QHashIterator<QChar, Node*> i(node->children);
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
i.next();
|
i.next();
|
||||||
deleteNode(i.value());
|
deleteNode(i.value());
|
||||||
|
@ -40,7 +40,7 @@ private:
|
|||||||
struct Node {
|
struct Node {
|
||||||
QChar c;
|
QChar c;
|
||||||
const AdBlockRule* rule;
|
const AdBlockRule* rule;
|
||||||
QHash<QChar, Node*> childs;
|
QHash<QChar, Node*> children;
|
||||||
|
|
||||||
Node() : c(0) , rule(0) { }
|
Node() : c(0) , rule(0) { }
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user