diff options
author | Martin Smith <martin.smith@digia.com> | 2014-11-05 12:51:12 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@digia.com> | 2014-11-12 08:12:03 +0100 |
commit | 98e77dab75e1463e51c2fc3893d2d44e146e9a8b (patch) | |
tree | 3e1cc9c365830c8fae8e41e145d95bb2437f0732 /src/tools/qdoc/tree.cpp | |
parent | 623891acd600861338e2bdb4b4084c6b6451eb0a (diff) |
qdoc: Generate the links-to-broken-links page
The cross-module link report now contains an entry
for the links to broken links subpage. It is the
last entry in the links-to-links table on the QA
page.
Change-Id: I9e0b3ba5f2efe76055902467348db878dbed9991
Task-number: QTBUG-41850
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/tree.cpp')
-rw-r--r-- | src/tools/qdoc/tree.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp index 819951d0e0..e11b7f1490 100644 --- a/src/tools/qdoc/tree.cpp +++ b/src/tools/qdoc/tree.cpp @@ -1423,27 +1423,29 @@ const Node* Tree::checkForCollision(const QString& name) The node \a t */ -QString Tree::getNewLinkTarget(const Node* t, const QString& fileName, QString& text) +QString Tree::getNewLinkTarget(const Node* t, const QString& fileName, QString& text, bool broken) { - QString target; - if (t) { + QString moduleName; + if (t && !broken) { Tree* tree = t->tree(); - incrementLinkCount(); if (tree != this) tree->incrementLinkCount(); - target = QString("qa-target-%1").arg(-(linkCount())); - QString moduleName = tree->moduleName(); - TargetLoc* tloc = new TargetLoc(target, fileName, text); - TargetList* tList = 0; - TargetListMap::iterator i = targetListMap_->find(moduleName); - if (i == targetListMap_->end()) { - tList = new TargetList; - i = targetListMap_->insert(moduleName, tList); - } - else - tList = i.value(); - tList->append(tloc); + moduleName = tree->moduleName(); + } + else + moduleName = "broken"; + incrementLinkCount(); + QString target = QString("qa-target-%1").arg(-(linkCount())); + TargetLoc* tloc = new TargetLoc(target, fileName, text, broken); + TargetList* tList = 0; + TargetListMap::iterator i = targetListMap_->find(moduleName); + if (i == targetListMap_->end()) { + tList = new TargetList; + i = targetListMap_->insert(moduleName, tList); } + else + tList = i.value(); + tList->append(tloc); return target; } |