summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qdocdatabase.cpp
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2014-08-22 10:04:10 +0200
committerTopi Reiniƶ <topi.reinio@digia.com>2014-08-26 20:08:58 +0200
commit15c32361d9469138edda9c6c7d9b3d3663081820 (patch)
tree49511b396f722bb3a9fbb00abb1f5b52a22203d2 /src/tools/qdoc/qdocdatabase.cpp
parentd28e2e225c140d4bcae5baabb768683fd5f9a692 (diff)
qdoc: Enable listing of example files with .html extension
If a (non-external) link string ends in '.html', qdoc assumed it is a direct link to a generated html page. However, it could also refer to an example file with .html extension. This commit fixes a corner case where links to an example file page were broken for such files. Task-number: QTBUG-40831 Change-Id: I31acc141970b6768f0a93964723be82611d37a3d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/qdocdatabase.cpp')
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index ffac23aae0..d06cb659c4 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -1627,8 +1627,12 @@ const Node* QDocDatabase::findNodeForAtom(const Atom* atom, const Node* relative
}
}
else {
- if (first.endsWith(".html"))
+ if (first.endsWith(".html")) {
node = findNodeByNameAndType(QStringList(first), Node::Document);
+ // the path may also refer to an example file with .html extension
+ if (!node && first.contains("/"))
+ return findNodeForTarget(targetPath, relative, genus, ref);
+ }
else if (first.endsWith("()"))
node = findFunctionNode(first, relative, genus);
else {