diff options
author | Topi Reinio <topi.reinio@digia.com> | 2015-10-28 13:25:18 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-10-29 15:21:46 +0000 |
commit | 57301c0003e9d776d31953f1411cc06a395b752e (patch) | |
tree | 080bbc5ce3c0d186fc43103d228829d27fce4b52 /src/qdoc/generator.cpp | |
parent | 9b0a352641b0da7b981606d723ca24d9535fc8c5 (diff) | |
download | qttools-57301c0003e9d776d31953f1411cc06a395b752e.tar.gz |
qdoc: Don't generate empty cells for the requisites table
The 'Inherits' and 'Inherited by' entries in the requisites table
sometime contain nodes referring to internal classes or classes
that cannot be resolved due to a missing dependency.
Avoid generating requisites with zero items by checking how many
items were actually added to the table (row), and skipping empty
ones.
Change-Id: I0515335618ca4671d5f64db123446ba82960ceea
Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/qdoc/generator.cpp')
-rw-r--r-- | src/qdoc/generator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp index 3ce5bf99d..81ad2a94b 100644 --- a/src/qdoc/generator.cpp +++ b/src/qdoc/generator.cpp @@ -190,7 +190,7 @@ void Generator::appendFullNames(Text& text, const NodeList& nodes, const Node* r } } -void Generator::appendSortedNames(Text& text, const ClassNode* cn, const QList<RelatedClass>& rc) +int Generator::appendSortedNames(Text& text, const ClassNode* cn, const QList<RelatedClass>& rc) { QList<RelatedClass>::ConstIterator r; QMap<QString,Text> classMap; @@ -216,9 +216,10 @@ void Generator::appendSortedNames(Text& text, const ClassNode* cn, const QList<R text << classMap[className]; text << comma(index++, classNames.count()); } + return index; } -void Generator::appendSortedQmlNames(Text& text, const Node* base, const NodeList& subs) +int Generator::appendSortedQmlNames(Text& text, const Node* base, const NodeList& subs) { QMap<QString,Text> classMap; int index = 0; @@ -239,6 +240,7 @@ void Generator::appendSortedQmlNames(Text& text, const Node* base, const NodeLis text << classMap[name]; text << comma(index++, names.count()); } + return index; } /*! |