summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qdocdatabase.cpp
diff options
context:
space:
mode:
authorMartin Smith <[email protected]>2014-11-25 15:18:49 +0100
committerMartin Smith <[email protected]>2015-01-12 13:12:05 +0100
commitdf6d2290e6399471431811160a0c0ff2eb16cb62 (patch)
tree4465dc3480b596391da7a0e13dc496d3ca0058ee /src/tools/qdoc/qdocdatabase.cpp
parent9da1a1286493846fb0d58f7a848c13653136e1b3 (diff)
qdoc: qdoc's 'square bracket' parameters were evaluated too early
qdoc's link command (\l) allows an optional first argument enclosed in square brackets. This argument is used for narrowing and focusing the search for the link target. The argument should not be evaluated until the generate phase, but it was being evaluated in the prepare phase. This was also a problem when running qdoc in the single-exec mode. This update prevents qdoc from evaluating the argument until it is used in the generate phase. Change-Id: I82785e97077053fb5f5c11f0592155675334aaeb Task-number: QTBUG-42880 Reviewed-by: Martin Smith <[email protected]>
Diffstat (limited to 'src/tools/qdoc/qdocdatabase.cpp')
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index 51908bc9e30..a2c1b82c7f6 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -1606,10 +1606,11 @@ void QDocDatabase::mergeCollections(CollectionNode* cn)
\a ref. If the returned node pointer is null, \a ref is not
valid.
*/
-const Node* QDocDatabase::findNodeForAtom(const Atom* atom, const Node* relative, QString& ref)
+const Node* QDocDatabase::findNodeForAtom(const Atom* a, const Node* relative, QString& ref)
{
const Node* node = 0;
+ Atom* atom = const_cast<Atom*>(a);
QStringList targetPath = atom->string().split("#");
QString first = targetPath.first().trimmed();