summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLuca Di Sera <luca.disera@qt.io>2022-07-07 16:51:54 +0200
committerLuca Di Sera <luca.disera@qt.io>2022-07-08 14:37:55 +0200
commitcc251c688575728227f9592045eb8d819c582b47 (patch)
tree0f84dfbb8464c5d63bc647a084ac6145bde40181 /tests
parentc6f58972ec1cc3f3fbd80333d78055291462d394 (diff)
downloadqttools-cc251c688575728227f9592045eb8d819c582b47.tar.gz
QDoc: Assume that aggregates have a single meaningful include file
QDoc's `Aggregates`, which are used to internally represent "containing" elements, such as cpp classes, have a concept of "include files". "include files" represent the name of a file or similar construct from which the aggregate can be obtained the sources. For example, the name an header file declaring a cpp class. Aggregates, up to now, exposed an interface that allowed to set multiple "include file" for each aggregate. Furthermore, QDoc allows the user to manually specify include files through the use of the "\inheaderfile" command. Those include files were later used by QDoc to show information about the aggregate, In particular, the generator would show an "include requisite" to help a user understand where to import the aggregate from. The multiplicity of the include files had effects on later parts of the code that either set or read them. For example, the generators whose code required handling the multiplicity to show the required information on multiple lines. In practice, this never took effect as, at least in Qt's codebase, no aggregate has more than 1 include file. While it is not unthinkable of wanting to have more than one include file, we consider improbable for it to happen. In general, include file will mostly be used for classes, which we expect to be able to be meaningfully included from a specific file only. As such, the interface for `Aggregates` is now modified to expose a single include file per aggregate. The previous methods were removed and a singular version of them was introduced. The internal state of `Aggregate` was modified to take this into account storing a single optional include file instead of a vector of them. A singular include file was set during the construction of `HeaderNode`. The constructor is now modified to use the new interface. Include files are then generally set only during the code parsing phase. In particular, each file-name coming from an "\inheaderfile" command was appended to the vector of include files. Furthermore, each aggregate either inherited the include files of one of its parent or generated one from the aggregate's name when no sensible parent was available, unless a previous "\inheaderfile" command for the aggregate was encountered. The code is now changed to take into account the lack of multiplicity. The semantic is mostly preserved from the previous version and, in the case of the Qt's codebase, is preserved entirely due to no aggregate with more than one include file ever being produced. Some slight semantic breakages are, albeit, included with this change. Previously, if the user provided more than one "\inheaderfile" command, the arguments from all of them would be preserved and saved in the relevant aggregate. With the current change, each "\inheaderfile" after the first will overwrite the preceding value, such that only the last encountered command will be taken, effectively, into account. This breakage would currently be opaque for the user. It is later advised to better expose this behavior through changes to `DocParser`, albeit those changes are not expected to be performed right away as a more thorough inspection of `DocParser` must be made in general. Furthermore, the previous version would set include files that could be the empty string, specifically as they came from an "\inheaderfile" command. The new version ignore empty include files, such that it is ensured that, if an include file was ever provided, that include file is not an empty string. This breakage improves on the previous version, where later user of the include files had to perform possibly costly filtering operations to avoid empty strings, who are expected to have no meaning as an include file. To better support this change and partially help in exposing this semantic, the new interface for the include file exposes an std::optional and informally guarantees, but does not enforce, that if a value is ever set it is not the empty string. The changes to the code were made so as to ensure that this will be the case as for the current codebase. A more thorough enforcement was avoided as it would require deeper changes that are currently unfeasible. User of the include file, namely the generators, were modified to take into account the lack of multiplicity. The generators previously depended on `CodeMarker::markedUpIncludes` to flatten the vector of include files into a representable string. `CodeMarker::markedUpIncludes` is now supplanted with `CodeMarker::markedUpInclude`, its singular version, to take into account the lack of multiplicity. The semantics of the method is preserved and is expected to be equivalent to a call to `CodeMarker::markedUpIncludes` for vectors of include files with a single element, with the exclusion of a trailing newline. Small clean up changes were made to `HtmlGenerator::addIncludeFilesToMap`, which is the main consumer of include file for the HTML format. The method was renamed to its singular version. Some now unnecessary operations, such as the filtering of include files that were the empty string, are now removed. The `text` parameter of the method, previously a `Text*`, is now modified to a reference. The `Text` that is passed to the method is always created in its immediate scope and is never a nullptr, allowing us to remove and unnecessary check. Indeed, calling the method with a nullptr would generally be a no-op, such that there would be no meaning to it in the first place (and there was no flow-requirement for it to be a no-op). A slight change to the laying out of the table in `HtmlGenerator::generateTheTable` was included to better divide the lines of the table. The regression files for `tst_generatedOutput` were regenerated to take into account the additional newlines in the tables. Change-Id: Idebca8a74444328cd21c83be9e3f3b1706907f84 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype.html5
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/crossmoduleref.html8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/dontdocument/seenclass.html8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/first.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/globals.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/headerfile/testheader.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html11
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc.html8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html10
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html11
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/second.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/space.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/template/bar.html8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/template/baz.html8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/template/foo.html8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html11
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-vec.html8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html11
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html9
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/testqdoc.html8
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/third.html4
21 files changed, 96 insertions, 60 deletions
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype.html b/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype.html
index 5db714b9b..f4ef5bca9 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype.html
@@ -23,8 +23,9 @@
<p>A class inheriting another class that lives in an external doc module. <a href="#details">More...</a></p>
<!-- @@@TestType -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestType&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestType&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></td></tr>
+</table></div>
<ul>
<li><a href="testtype-members.html">List of all members, including inherited members</a></li>
</ul>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/crossmoduleref.html b/tests/auto/qdoc/generatedoutput/expected_output/crossmoduleref.html
index e8e8b37af..1ebb00cd2 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/crossmoduleref.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/crossmoduleref.html
@@ -20,9 +20,11 @@
<p>Namespace that has documented functions in multiple modules. <a href="#details">More...</a></p>
<!-- @@@CrossModuleRef -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;CrossModuleRef&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;CrossModuleRef&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+</table></div>
<h2 id="functions">Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="crossmoduleref.html#documentMe">documentMe</a></b>()</td></tr>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/seenclass.html b/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/seenclass.html
index c0501ee46..bbb96a505 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/seenclass.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/seenclass.html
@@ -21,9 +21,11 @@
<p>A public but undocumented class. <a href="#details">More...</a></p>
<!-- @@@SeenClass -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;SeenClass&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;SeenClass&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+</table></div>
<!-- $$$SeenClass-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/first.html b/tests/auto/qdoc/generatedoutput/expected_output/first.html
index f46004f6e..5141fa60e 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/first.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/first.html
@@ -18,8 +18,8 @@
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">First Struct</h1>
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;First&gt;</span>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;First&gt;</span></td></tr>
+</table></div>
<ul>
<li><a href="first-members.html">List of all members, including inherited members</a></li>
</ul>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/globals.html b/tests/auto/qdoc/generatedoutput/expected_output/globals.html
index 943907b61..6f7419b26 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/globals.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/globals.html
@@ -18,8 +18,8 @@
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Globals Class</h1>
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Globals&gt;</span>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Globals&gt;</span></td></tr>
+</table></div>
<h2 id="related-non-members">Related Non-Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="globals.html#foo">foo</a></b>(int <i>a</i>)</td></tr>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/headerfile/testheader.html b/tests/auto/qdoc/generatedoutput/expected_output/headerfile/testheader.html
index 66d967bb0..1c99fd0a8 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/headerfile/testheader.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/headerfile/testheader.html
@@ -18,8 +18,8 @@
<p>A header file. <a href="#details">More...</a></p>
<!-- @@@<TestHeader> -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestHeader&gt;</span>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestHeader&gt;</span></td></tr>
+</table></div>
<ul>
<li><TestHeader> is part of <a href="headers.html">Headers</a>.</li>
</ul>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html
index 03544e367..2aca309f5 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html
@@ -27,10 +27,13 @@
<p>A class in a namespace. <a href="#details">More...</a></p>
<!-- @@@Test -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
+</td></tr>
+</table></div>
<ul>
<li><a href="testqdoc-test-members.html">List of all members, including inherited members</a></li>
<li><a href="testqdoc-test-obsolete.html">Deprecated members</a></li>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc.html b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc.html
index 15a83f68d..8229a4e5b 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc.html
@@ -22,9 +22,11 @@
<p>A namespace. <a href="#details">More...</a></p>
<!-- @@@TestQDoc -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestCPP&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestCPP&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+</table></div>
<h2 id="classes">Classes</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html">Test</a></b></td></tr>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html
index 689465a13..c7b3a186f 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived.html
@@ -28,9 +28,13 @@
<p>A derived class in a namespace. <a href="#details">More...</a></p>
<!-- @@@TestDerived -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestDerived&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Instantiated By:</td><td class="memItemRight bottomAlign"> <a href="qml-thetype.html">TheType</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="testqdoc-test.html">TestQDoc::Test</a></td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestDerived&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> Instantiated By:</td><td class="memItemRight bottomAlign"> <a href="qml-thetype.html">TheType</a></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="testqdoc-test.html">TestQDoc::Test</a></td></tr>
+</table></div>
<ul>
<li><a href="testqdoc-testderived-members.html">List of all members, including inherited members</a></li>
<li><a href="testqdoc-testderived-obsolete.html">Deprecated members</a></li>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html
index 25d587348..58686026d 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html
@@ -27,10 +27,13 @@
<p>A class in a namespace. <a href="#details">More...</a></p>
<!-- @@@Test -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
+</td></tr>
+</table></div>
<ul>
<li><a href="testqdoc-test-members.html">List of all members, including inherited members</a></li>
<li><a href="testqdoc-test-obsolete.html">Deprecated members</a></li>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/second.html b/tests/auto/qdoc/generatedoutput/expected_output/second.html
index b932dc7fa..5491bf982 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/second.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/second.html
@@ -17,8 +17,8 @@
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Second Class</h1>
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Second&gt;</span>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Second&gt;</span></td></tr>
+</table></div>
<!-- $$$Second-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/space.html b/tests/auto/qdoc/generatedoutput/expected_output/space.html
index c84aae428..569eaa001 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/space.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/space.html
@@ -20,8 +20,8 @@
<p>A namespace..&#x2e;in space. <a href="#details">More...</a></p>
<!-- @@@Space -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Space&gt;</span>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Space&gt;</span></td></tr>
+</table></div>
<h2 id="functions">Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="space.html#spaceFun">spaceFun</a></b>(Space::spacename <i>space</i>)</td></tr>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/template/bar.html b/tests/auto/qdoc/generatedoutput/expected_output/template/bar.html
index 905692c12..df9e0fd45 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/template/bar.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/template/bar.html
@@ -22,9 +22,11 @@
<p>Another class template. <a href="#details">More...</a></p>
<!-- @@@Bar -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Bar&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Bar&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+</table></div>
<!-- $$$Bar-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/template/baz.html b/tests/auto/qdoc/generatedoutput/expected_output/template/baz.html
index 6b4d5d06b..f031d3113 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/template/baz.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/template/baz.html
@@ -22,9 +22,11 @@
<p>Class template template. <a href="#details">More...</a></p>
<!-- @@@Baz -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Baz&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Baz&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+</table></div>
<!-- $$$Baz-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/template/foo.html b/tests/auto/qdoc/generatedoutput/expected_output/template/foo.html
index 6ba8fb2cf..fc657d24c 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/template/foo.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/template/foo.html
@@ -22,9 +22,11 @@
<p>Class template. <a href="#details">More...</a></p>
<!-- @@@Foo -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Foo&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Foo&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+</table></div>
<!-- $$$Foo-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html
index 087fb5f64..167580f42 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html
@@ -27,10 +27,13 @@
<p>A class in a namespace. <a href="#details">More...</a></p>
<!-- @@@Test -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
+</td></tr>
+</table></div>
<ul>
<li><a href="testqdoc-test-members.html">List of all members, including inherited members</a></li>
<li><a href="testqdoc-test-obsolete.html">Deprecated members</a></li>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-vec.html b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-vec.html
index 2b97dcf84..84319c5fa 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-vec.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-vec.html
@@ -22,9 +22,11 @@
<p>Type alias that has its own reference. <a href="#details">More...</a></p>
<!-- @@@Vec -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Vec&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Vec&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+</table></div>
<!-- $$$Vec-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html
index 153f824f8..22b9c2aa3 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html
@@ -27,10 +27,13 @@
<p>A class in a namespace. <a href="#details">More...</a></p>
<!-- @@@Test -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Test&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="testqdoc-testderived.html">TestQDoc::TestDerived</a></p>
+</td></tr>
+</table></div>
<ul>
<li><a href="testqdoc-test-members.html">List of all members, including inherited members</a></li>
<li><a href="testqdoc-test-obsolete.html">Deprecated members</a></li>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html
index 9f7a9211a..ec7aca459 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived.html
@@ -24,9 +24,12 @@
<p>A derived class in a namespace. <a href="#details">More...</a></p>
<!-- @@@TestDerived -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestDerived&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="testqdoc-test.html">TestQDoc::Test</a></td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestDerived&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="testqdoc-test.html">TestQDoc::Test</a></td></tr>
+</table></div>
<ul>
<li><a href="testqdoc-testderived-members.html">List of all members, including inherited members</a></li>
<li><a href="testqdoc-testderived-obsolete.html">Deprecated members</a></li>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc.html
index 15a83f68d..8229a4e5b 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc.html
@@ -22,9 +22,11 @@
<p>A namespace. <a href="#details">More...</a></p>
<!-- @@@TestQDoc -->
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestCPP&gt;</span>
-</td></tr><tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
-target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;TestCPP&gt;</span></td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> CMake:</td><td class="memItemRight bottomAlign"> find_package(Qt6 REQUIRED COMPONENTS QDocTest) <br/>
+target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr>
+<tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += testcpp</td></tr>
+</table></div>
<h2 id="classes">Classes</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html">Test</a></b></td></tr>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/third.html b/tests/auto/qdoc/generatedoutput/expected_output/third.html
index 3ca46d463..eda83fdce 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/third.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/third.html
@@ -17,8 +17,8 @@
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Third Class</h1>
<div class="table"><table class="alignedsummary">
-<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Third&gt;</span>
-</td></tr></table></div>
+<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include &lt;Third&gt;</span></td></tr>
+</table></div>
<!-- $$$Third-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>