qdoc: Eliminate duplicate page warnings in some cases
Prevent qdoc from reporting duplicate pages for external pages with the same URL and title. Task-number: QTBUG-33462 Change-Id: Idabdb241aaa4fe105f7b3ea78229ff1ae8776ecf Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
parent
59601e06d9
commit
93d7ee0da3
@ -1035,7 +1035,21 @@ void QDocDatabase::resolveTargets(InnerNode* root)
|
||||
DocNode* node = static_cast<DocNode*>(child);
|
||||
if (!node->title().isEmpty()) {
|
||||
QString key = Doc::canonicalTitle(node->title());
|
||||
docNodesByTitle_.insert(key, node);
|
||||
QList<DocNode*> nodes = docNodesByTitle_.values(key);
|
||||
bool alreadyThere = false;
|
||||
if (!nodes.empty()) {
|
||||
for (int i=0; i< nodes.size(); ++i) {
|
||||
if (nodes[i]->subType() == Node::ExternalPage) {
|
||||
if (node->name() == nodes[i]->name()) {
|
||||
alreadyThere = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!alreadyThere) {
|
||||
docNodesByTitle_.insert(key, node);
|
||||
}
|
||||
}
|
||||
if (node->subType() == Node::Collision) {
|
||||
resolveTargets(node);
|
||||
|
Loading…
Reference in New Issue
Block a user