diff options
author | Martin Smith <martin.smith@digia.com> | 2014-03-19 15:12:07 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-31 21:05:23 +0200 |
commit | 2ea15849a09208ac19d189acdc51c313b64a0b3a (patch) | |
tree | 630825cea808fcd38e39a257754b8dffd72307a5 /src/tools/qdoc/tree.h | |
parent | 900c150a07f627c20ad68ec59253196d9960b034 (diff) |
qdoc: \l{Qt::Window} links to the wrong page
kThis update fixes a bug introduced by the extensive changes
for QTBUG-35377. The name Qt represents two namespaces, one
in C++ and one in QML. The name "Window" is used in both of
them, so the link \l{Qt::Window} would cause a collision in
the single tree qdoc. In the multiple tree qdoc, there is
no collision, but in this case the link should have gone to
the C++ page and it went to the QML page instead. The fix
involved correcting the way qdoc searches for link targets.
Task-number: QTBUG-37633
Change-Id: Ib9b209eced937a0be0d3299f300ebf22b2776012
Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/tree.h')
-rw-r--r-- | src/tools/qdoc/tree.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tools/qdoc/tree.h b/src/tools/qdoc/tree.h index 565cb9c471..916682daad 100644 --- a/src/tools/qdoc/tree.h +++ b/src/tools/qdoc/tree.h @@ -86,10 +86,11 @@ class Tree ClassNode* findClassNode(const QStringList& path, Node* start = 0) const; NamespaceNode* findNamespaceNode(const QStringList& path) const; FunctionNode* findFunctionNode(const QStringList& parentPath, const FunctionNode* clone); + const Node* resolveFunctionTarget(const QString& target, const Node* relative); Node* findNodeRecursive(const QStringList& path, int pathIndex, - Node* start, + const Node* start, Node::Type type, Node::SubType subtype, bool acceptCollision = false) const; @@ -112,7 +113,7 @@ class Tree Node* findNodeByNameAndType(const QStringList& path, Node::Type type, Node::SubType subtype, - bool acceptCollision = false); + bool acceptCollision = false) const; InnerNode* findRelatesNode(const QStringList& path); @@ -121,8 +122,8 @@ class Tree QString findTarget(const QString& target, const Node* node) const; void insertTarget(const QString& name, TargetRec::Type type, Node* node, int priority); void resolveTargets(InnerNode* root); - const Node* findUnambiguousTarget(const QString& target, QString& ref, const Node* relative); - const DocNode* findDocNodeByTitle(const QString& title, const Node* relative = 0) const; + const Node* findUnambiguousTarget(const QString& target, QString& ref); + const DocNode* findDocNodeByTitle(const QString& title) const; void addPropertyFunction(PropertyNode *property, const QString &funcName, @@ -173,7 +174,7 @@ class Tree ModuleNode* addToModule(const QString& name, Node* node); QmlModuleNode* addToQmlModule(const QString& name, Node* node); - QmlClassNode* lookupQmlType(const QString& name) { return qmlTypeMap_.value(name); } + QmlClassNode* lookupQmlType(const QString& name) const { return qmlTypeMap_.value(name); } void insertQmlType(const QString& key, QmlClassNode* n); void addExampleNode(ExampleNode* n) { exampleNodeMap_.insert(n->title(), n); } ExampleNodeMap& exampleNodeMap() { return exampleNodeMap_; } |