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 08:57:43 +0000 |
commit | 912d5f0ef83a33640d44fd42d0dde7b26c7425d0 (patch) | |
tree | 7277b97a24825110d64d2604764ed4a3fd157b7f | |
parent | 0d5e25ced0c88b51c87ebe14fbb52583df59a53a (diff) |
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 1e44814f9..e80649a95 100644 --- a/src/qdoc/htmlgenerator.cpp +++ b/src/qdoc/htmlgenerator.cpp @@ -2217,8 +2217,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> |