summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/tree.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2014-11-11 13:10:41 +0100
committerMartin Smith <martin.smith@digia.com>2014-11-12 10:53:45 +0100
commit302b6235eb7c4b6f63355483949f5915660d2c43 (patch)
treeb5a6b123fdc79f5cb544369a9ab991207f96f540 /src/tools/qdoc/tree.cpp
parentad2cdb2c9474b7ac37eeae0bf932d01bcfc51c2d (diff)
qdoc: Include source file and line number of links
Each entry in the link-to-link tables and in the broken-links table now includes the source file path of the file where the link or broken link appears and the line number in that file. The line number often refers to where the comment that contains the link begins, so sometimes the link or broken link appears further down in that comment. Change-Id: I692bfc173c8711bf26c9c59ad9771930c27e24a8 Task-number: QTBUG-41850 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/tree.cpp')
-rw-r--r--src/tools/qdoc/tree.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp
index e11b7f1490..a4b8d8cd8a 100644
--- a/src/tools/qdoc/tree.cpp
+++ b/src/tools/qdoc/tree.cpp
@@ -1423,7 +1423,11 @@ const Node* Tree::checkForCollision(const QString& name)
The node \a t
*/
-QString Tree::getNewLinkTarget(const Node* t, const QString& fileName, QString& text, bool broken)
+QString Tree::getNewLinkTarget(const Node* locNode,
+ const Node* t,
+ const QString& fileName,
+ QString& text,
+ bool broken)
{
QString moduleName;
if (t && !broken) {
@@ -1436,7 +1440,7 @@ QString Tree::getNewLinkTarget(const Node* t, const QString& fileName, QString&
moduleName = "broken";
incrementLinkCount();
QString target = QString("qa-target-%1").arg(-(linkCount()));
- TargetLoc* tloc = new TargetLoc(target, fileName, text, broken);
+ TargetLoc* tloc = new TargetLoc(locNode, target, fileName, text, broken);
TargetList* tList = 0;
TargetListMap::iterator i = targetListMap_->find(moduleName);
if (i == targetListMap_->end()) {