summaryrefslogtreecommitdiffstats
path: root/src/qdoc/tree.h
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@theqtcompany.com>2016-03-03 14:40:57 +0100
committerJake Petroules <jake.petroules@theqtcompany.com>2016-03-04 22:42:20 +0000
commit2d07f5db4273d4aea7b9f9d924fdd84ce992052d (patch)
treece4eb9171143ea047b495cadf891b9b9121894c9 /src/qdoc/tree.h
parent2d02c495f2f8b5b9f944545d3d28f2660fbb4582 (diff)
qdoc: Fix link disambiguation
The link command allows a qualifier in square brackets, which tells qdoc the specific kind of page that must be found to satisfy the link. The square bracket parameter was being ignored in one case, because it wasn't being passed to a certain search function. This update passes that parameter to the search function, and the search function uses it to disqualify pages that should not be accepted. This fix causes qdoc to add 4 new qdoc errors when generating the docs for my Qt5 installation. I don't know what these are, but I suspect they are real errors that qdoc was not reporting because the square bracket parameter was being ignored in this case. Change-Id: I45f1fd43039df7bb048711fc5b752a71a006e5de Task-number: QTBUG-51587 Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'src/qdoc/tree.h')
-rw-r--r--src/qdoc/tree.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qdoc/tree.h b/src/qdoc/tree.h
index 35a169a42..1c6ebcf41 100644
--- a/src/qdoc/tree.h
+++ b/src/qdoc/tree.h
@@ -64,6 +64,7 @@ struct TargetRec
}
bool isEmpty() const { return ref_.isEmpty(); }
+ Node::Genus genus() { return (node_ ? node_->genus() : Node::DontCare); }
Node* node_;
QString ref_;
@@ -151,7 +152,7 @@ class Tree
Node* node,
int priority);
void resolveTargets(Aggregate* root);
- const Node* findUnambiguousTarget(const QString& target, QString& ref) const;
+ const Node* findUnambiguousTarget(const QString& target, Node::Genus genus, QString& ref) const;
const DocumentNode* findDocumentNodeByTitle(const QString& title) const;
void addPropertyFunction(PropertyNode *property,