diff options
Diffstat (limited to 'src/tools/qdoc/qdocdatabase.cpp')
-rw-r--r-- | src/tools/qdoc/qdocdatabase.cpp | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index 7a3df4e4f2..a50f428d24 100644 --- a/src/tools/qdoc/qdocdatabase.cpp +++ b/src/tools/qdoc/qdocdatabase.cpp @@ -190,17 +190,19 @@ DocNode* QDocDatabase::findQmlModule(const QString& name) QStringList dotSplit; QStringList blankSplit = name.split(QLatin1Char(' ')); QString qmid = blankSplit[0]; + QString qmlModuleName = qmid; if (blankSplit.size() > 1) { dotSplit = blankSplit[1].split(QLatin1Char('.')); qmid += dotSplit[0]; } DocNode* dn = 0; - if (qmlModules_.contains(qmid)) - return qmlModules_.value(qmid); - dn = new DocNode(tree_->root(), name, Node::QmlModule, Node::OverviewPage); + if (qmlModules_.contains(qmlModuleName)) + return qmlModules_.value(qmlModuleName); + dn = new DocNode(tree_->root(), qmlModuleName, Node::QmlModule, Node::OverviewPage); dn->markNotSeen(); dn->setQmlModuleInfo(name); - qmlModules_.insert(qmid,dn); + qmlModules_.insert(qmlModuleName,dn); + masterMap_.insert(qmlModuleName,dn); masterMap_.insert(qmid,dn); masterMap_.insert(dn->name(),dn); return dn; @@ -612,7 +614,7 @@ void QDocDatabase::findAllObsoleteThings(const InnerNode* node) case Node::QmlMethod: if ((*c)->parent()) { Node* parent = (*c)->parent(); - if (parent->subType() == Node::QmlPropertyGroup && parent->parent()) + if (parent->type() == Node::QmlPropertyGroup && parent->parent()) parent = parent->parent(); if (parent && parent->subType() == Node::QmlClass && !parent->name().isEmpty()) name = parent->name() + "::" + name; @@ -923,8 +925,10 @@ const DocNode* QDocDatabase::findDocNodeByTitle(const QString& title, const Node if (j != docNodesByTitle_.constEnd() && j.key() == i.key()) { QList<Location> internalLocations; while (j != docNodesByTitle_.constEnd()) { - if (j.key() == i.key() && j.value()->url().isEmpty()) + if (j.key() == i.key() && j.value()->url().isEmpty()) { internalLocations.append(j.value()->location()); + break; // Just report one duplicate for now. + } ++j; } if (internalLocations.size() > 0) { @@ -1031,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); |