diff options
author | Topi Reinio <topi.reinio@qt.io> | 2021-01-27 18:41:22 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-01-28 09:27:43 +0000 |
commit | 63bacb8f099b35a68d86a20a80e8ff5e33f86d5f (patch) | |
tree | 7597b2b721f6f18dfe7d1bc39085a8366e398d95 | |
parent | 57a6c4852376027df7808cda250339dd5b37000e (diff) | |
download | qttools-63bacb8f099b35a68d86a20a80e8ff5e33f86d5f.tar.gz |
qdoc: Fix generation of TOC for basic QML/JS types
Fixes: QTBUG-90691
Change-Id: I576849bb291926461f40622278619ffe096036cf
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
(cherry picked from commit cf8eb842984c315e8f0843d88bd6f42b73032117)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/qdoc/htmlgenerator.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qdoc/generatedoutput/expected_output/qml-int.html | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp index a1b53458a..7693c599f 100644 --- a/src/qdoc/htmlgenerator.cpp +++ b/src/qdoc/htmlgenerator.cpp @@ -2294,8 +2294,8 @@ void HtmlGenerator::generateTableOfContents(const Node *node, CodeMarker *marker } } } else if (sections - && (node->isClassNode() || node->isNamespace() || node->isQmlType() - || node->isJsType())) { + && (node->isClassNode() || node->isNamespace() || node->isQmlType() || + node->isJsType() || node->isQmlBasicType() || node->isJsBasicType())) { for (const auto §ion : qAsConst(*sections)) { if (!section.members().isEmpty()) { out() << "<li class=\"level" << sectionNumber << "\"><a href=\"#" diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-int.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-int.html index 0b21da628..16603af4b 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/qml-int.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-int.html @@ -10,6 +10,8 @@ <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> +<li class="level1"><a href="#methods">Methods</a></li> +<li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> |