From 2a56a3bad75c0cc5befa1ce874995570e622cffc Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 8 Aug 2014 13:42:32 +0200 Subject: [PATCH] qdoc: Fix a few cases for '[ ... ]' linking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This update fixes a few cases that didn't work correctly. The problem was caused by calling findNodeForTarget() with a pointer to a relative node, but the relative node pointer should always be 0, when the domain tree to be searched is not the same as the tree containing the relative node. This fix sets the relative node pointer to 0 in that case. Change-Id: I2fe4a7a4a3b6392199666c7d49b473a56697e7b5 Task-number: QTBUG-39221 Reviewed-by: Topi Reiniƶ --- src/tools/qdoc/qdocdatabase.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index 8211f35342..ffac23aae0 100644 --- a/src/tools/qdoc/qdocdatabase.cpp +++ b/src/tools/qdoc/qdocdatabase.cpp @@ -1620,6 +1620,8 @@ const Node* QDocDatabase::findNodeForAtom(const Atom* atom, const Node* relative target = targetPath.at(0); targetPath.removeFirst(); } + if (relative && relative->tree()->moduleName() != domain->moduleName()) + relative = 0; node = domain->findNodeForTarget(nodePath, target, relative, flags, genus, ref); return node; }