diff options
author | Martin Smith <martin.smith@digia.com> | 2014-10-28 14:25:44 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@digia.com> | 2014-11-11 15:35:33 +0100 |
commit | 17472a2ba329a0d329aa21c9ffef62fec0de46c5 (patch) | |
tree | c3d98829b5568de4b033ca518b4dbe972d55abde /src/tools/qdoc/tree.h | |
parent | 894b579e3492dfa33832841fc9115d40d5b7595c (diff) |
qdoc: Generate cross-module links-to-links pages
The cross-module link report is modified so that each module
listed in the table is a link to a subpage on which all the
links from the current module to that module are listed. To
check that these links go to the correct place, click on one
to be taken to the actual link. The actual link is marked
with red asterisks. Click on that link to check that the link
goes to the correct page. Repeat this process for all the
links in the table.
Change-Id: Ifddf7108ed7ef090c4063909fdbd10dac1f2566b
Task-number: QTBUG-41850
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/tree.h')
-rw-r--r-- | src/tools/qdoc/tree.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/tools/qdoc/tree.h b/src/tools/qdoc/tree.h index 75f751f976..9c55595a77 100644 --- a/src/tools/qdoc/tree.h +++ b/src/tools/qdoc/tree.h @@ -67,10 +67,22 @@ struct TargetRec Type type_; }; +struct TargetLoc +{ + public: + TargetLoc(const QString& t, const QString& fileName, const QString& text) + : target_(t), fileName_(fileName), text_(text) { } + QString target_; + QString fileName_; + QString text_; +}; + typedef QMultiMap<QString, TargetRec*> TargetMap; typedef QMultiMap<QString, DocNode*> DocNodeMultiMap; typedef QMap<QString, QmlClassNode*> QmlTypeMap; typedef QMultiMap<QString, const ExampleNode*> ExampleNodeMap; +typedef QVector<TargetLoc*> TargetList; +typedef QMap<QString, TargetList*> TargetListMap; class Tree { @@ -193,18 +205,21 @@ class Tree bool docsHaveBeenGenerated() const { return docsHaveBeenGenerated_; } void setTreeHasBeenAnalyzed() { treeHasBeenAnalyzed_ = true; } void setdocsHaveBeenGenerated() { docsHaveBeenGenerated_ = true; } + QString getNewLinkTarget(const Node* t, const QString& fileName, QString& text); + TargetList* getTargetList(const QString& module); + QStringList getTargetListKeys() { return targetListMap_->keys(); } public: const QString& moduleName() const { return module_; } const QString& indexFileName() const { return indexFileName_; } - void incrementLinkCount() { --linkCount_; } + long incrementLinkCount() { return --linkCount_; } void clearLinkCount() { linkCount_ = 0; } - int linkCount() const { return linkCount_; } + long linkCount() const { return linkCount_; } private: bool treeHasBeenAnalyzed_; bool docsHaveBeenGenerated_; - int linkCount_; + long linkCount_; QString module_; QString indexFileName_; QDocDatabase* qdb_; @@ -218,6 +233,7 @@ private: CNMap qmlModules_; QmlTypeMap qmlTypeMap_; ExampleNodeMap exampleNodeMap_; + TargetListMap* targetListMap_; }; QT_END_NAMESPACE |