summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2019-09-05 13:05:01 +0200
committerTopi Reinio <topi.reinio@qt.io>2019-09-12 00:46:12 +0200
commit188cc2019bf19b0a86fc56652fa683226a21dd90 (patch)
tree49f6c5b24db371be9591217eff2bc2c732a40ef2
parentb0e9c1c5367ab6da76850139bddab2578fc179cd (diff)
downloadqttools-188cc2019bf19b0a86fc56652fa683226a21dd90.tar.gz
qdoc: Remove superfluous '#' symbol from generated links
This sneaky regression happened as a result of rearranging the inheritance tree of Node-derived classes. HtmlGenerator::linkForNode() intends to add #anchor to a link if it's associated with a Node that does *not* generate an .html page of its own. It did this by checking whether a page is an Aggregate. However, since the node tree refactoring, TextPageNode instances are not Aggregates but do generate .html pages. This caused excess '#' to be added to all links pointing to a \page. Luckily, we have Node::isPageNode() which is designed for this purpose - it tells whether a node has an .html file associated with it. Fixes: QTBUG-78040 Change-Id: Ie847c69c4df79075e950aea1ea30c0dcea4f2e4b Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--src/qdoc/htmlgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
index 619630ab9..a2eb42af8 100644
--- a/src/qdoc/htmlgenerator.cpp
+++ b/src/qdoc/htmlgenerator.cpp
@@ -3988,7 +3988,7 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative)
}
QString link = fn;
- if ((!node->isAggregate() && !node->isCollectionNode()) || node->isPropertyGroup()) {
+ if (!node->isPageNode() || node->isPropertyGroup()) {
QString ref = refForNode(node);
if (relative && fn == fileName(relative) && ref == refForNode(relative))
return QString();