diff options
author | Luca Di Sera <luca.disera@qt.io> | 2022-09-28 14:31:29 +0200 |
---|---|---|
committer | Luca Di Sera <luca.disera@qt.io> | 2022-09-29 10:48:13 +0000 |
commit | e10aa3cd2194eaad8d2ba1add83b46a2d3274bed (patch) | |
tree | d778fe6fa808ccb7970e2ea875b37e27f0012fe3 /tests | |
parent | 6713d066a8346d78a24ecbf6bbb1dff7fb57cf72 (diff) | |
download | qttools-e10aa3cd2194eaad8d2ba1add83b46a2d3274bed.tar.gz |
QDoc: Fix ordering of detailed members/all members section
QDoc organizes the way in which certain list of elements of the
documentation are ordered when rendered through an internal structure,
`Sections`, that, given an `Aggregate`, an internal representation of a
documentable element that is composed of multiple documentable elements,
partitions the member of the `Aggregates` into multiple ordered sets
that dictate the order of the elements in the output documentation.
Internally, `Sections` contains an associate structure, `Section`, that
exposes a series of maps ordered based on the ordering relation defined
by the free-function `sortName` in "sections.cpp".
`sortName`, produces an orderable string based on the name of a certain
element and its properties.
For example, for elements that are constructors it produces a string
that is alphabetically ordered before the one that it produces for
elements that are destructors.
In particular, `sortName` produces a string that is composed of a prefix
letter, dictating the order for the class of documentable element.
Furthermore, it produces a suffix for overloads, to ensure that they are
ordered based on their overload number.
If the element has no "particular" property, a general prefix that
precedes almost any other element is used.
For example, `sortName` was supposed to order the list of functions in a
class with the order constructors, destructors, everything else that is
not an operator, operators.
To support this ordering the prefixes "C", "D", "E" and "F" were used
respectively, so that a constructor X would produce a sortable string
"CX", a destructor X would produce the sortable string "DX" and so on.
For overloads, a number would be added as a suffix, such that, given two
function X and Y that are overloads, that is they have the same name N,
the produced name would be, for example, "EN" and "EN 1", further
producing an internal order for equivalently named elements.
The number that is used in this case is the "overload number" of a
function.
When QDoc encounters a series of overloads, it stores them into a linked
list, to relate them.
Furthermore, one of the overload is chosen as a "primary overload",
acting as the head of the list and as the target candidate to resolve an
ambiguous link to an overloaded function.
All elements of a linked list of overloads are given a number. The
"primary overload" is given the number 0, the next overload in the list,
generally depending on the order in which QDoc encounters the
documentation for the overloaded elements, is given the number 1 and so on.
Nonetheless, the code for `sortName`, was incorrectly implemented, so
that the produced string was not able to take into account certain
properties of some C++ documentable elements, such as the element being
a constructor or a destructor, instead producing a general ordered
string that partitioned them with other non ordered elements.
The bug was due to an incorrectly implemented branch condition.
`sortName` would branch on a function to check if it is a constructor,
destructor or operator only if the function was marked as a "cpp
function", as per `FunctionNode::isCppFunction`.
A `FunctionNode`, the internal representation for documentable elements
that are C++ functions, signal, slots, variables or QML methods, signals
or signal handlers, is marked with a "metaness", that decides the "kind"
of element that the `FunctionNode` instance represents.
For example, a `FunctionNode` instance that represents a QML method
would have a metaness of `QmlMethod`, while a `FunctionNode` instance
that represents a constructor would have a metaness of `Ctor`.
The `isCppFunction` method specifically checks that a `FunctionNode`
instance has a metaness of "Plain", which is the metaness that
`FunctionNode` that are non-QML,
non-signal, non-slot, non-constructor, non-destructor, non-macro,
non-assignment-operator have.
As a constructor, destructor, signal, slot and assignment-operator would
have a different metaness, the code that specifically handled those
cases was never reached, such that the produced string for those
elements was the fallback one, simply producing a prefix of "B" followed
by the node name.
This in turn ordered them in a mixed way, such that, for example,
instead of having constructors being followed by destructors, the
generated documentation would position other elements in-between.
Furthermore, as the correct branches were never taken, the overload
number for overloaded constructors, destructors, signal, slots and
assignment-operators would not be added as a suffix, resulting in an
internal order that varied depending on the internal structure and
sorting algorithm used to sort the elements of a `Section`.
In our specific case, `Section` uses a `QMultiMap`. As the overload
number was not taken into account, overloads would be stored under the
same key, and generally appear in reverse order, such that "X1", "X2",
"X3" would be ordered as "X3", "X2", "X1".
To solve the issue, the code was reorganized so that the expected
sortable string was produced for the afflicted elements and the overload
number would be taken into account when relevant.
This is done by removing the incorrect condition, instead conditioning
the code based on the inspected element being a `FunctionNode` that
comes from C++ code.
With the change, the following ordering problems are resolved in the
documentation:
- In the detailed members section of a C++ class, constructors and
destructors were not ordered one after the other, possibly having
other members in between.
For example, the documentation for `QObject` would show the only
available constructor, followed by the `deleteLater`,
`objectNameChanged` and `destroyed`slot and signals, followed by
the destructor.
With the change, the constructor will be followed by the
destructor and then by all other elements.
- Overloaded elements that are constructors, destructors, slots,
signals and assignment operators were ordered in the opposite order
that QDoc ascribes to them.
For example, in `QAxObject` the constructors would be ordered as
"constructor with arity-2 and IUnknown first parameter",
"constructor with arity-2 and QString parameter", "constructor
with arity-1", while QDoc consider those overloads in the opposite order.
With the change, they are now ordered as QDoc orders them.
Do note that the order that QDoc uses depends mainly on the order
in which the elements are documented in the code, meaning that if
there is a lack of consistency in the order in which the
constructor are documented, there will be a lack of consistency in
their order in the documentation.
Generally, it seems that lower-arity overloads are documented
before their higher-arity counterparts, providing for an easier to
read order.
Nonetheless, in the future this might change so that QDoc actively
orders overload based on some of their properties, such that the
current ordering should not be relied upon.
- Certain non-constructor, non-destructor, non-operator elements in
the detailed members section of a C++ class were not ordered
alphabetically.
In particular, slot and signals.
For example, `QObject` would position the `deleteLater`,
`objectNameChanged` and `destroyed`slot and signals at the top of
the list, between the constructor and destructor.
With the change, those kind of members will be positioned with all
other non-constructor, non-destructor and non-operator members,
positioned based on their alphabetical order.
- All instances of an assignment operator in the detailed members
section of a C++ class were ordered at the top of the list of
elements, together with constructor, destructors, signal and slots.
For example, in the documentation for `QString` they would appear
between the constructors and destructor.
With the change they are now correctly positioned at the end of
the list with all other operators.
All of the above changes have the same effect on the
ordering of the all members file of a C++ class.
The regression-files for `tst_generatedOutput` were regenerated to take
into account the changes, as they were generally afflicted by the
incorrect positioning of the assignment operators.
Change-Id: Ia7e3897b8c33aca0a753ddc73bdd79a962e73746
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'tests')
10 files changed, 66 insertions, 66 deletions
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype-members.html b/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype-members.html index b1fd053df..7d671271b 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/crossmodule/testtype-members.html @@ -14,7 +14,6 @@ <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-typedef">DerivedType</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-typedef">NotTypedef</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> -<li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b></span>(bool, const char *) : void (*)(bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs">methodWithEmDashInItsDocs</a></b></span>()</li> @@ -26,6 +25,7 @@ <li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b></span>(int, bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#virtualFun">virtualFun</a></b></span>()</li> +<li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> </ul> </body> </html> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml index 76b566533..dc4b5b3f6 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testqdoc-test.xml @@ -80,24 +80,6 @@ </db:constructorsynopsis> <db:para>Default constructor.</db:para> </db:section> -<db:section xml:id="operator-eq"> -<db:title>[default] Test::TestQDoc::Test &operator=(TestQDoc::Test &&<db:emphasis>other</db:emphasis>)</db:title> -<db:methodsynopsis> -<db:type>TestQDoc::Test &</db:type> -<db:methodname>operator=</db:methodname> -<db:methodparam> -<db:type>TestQDoc::Test &&</db:type> -<db:parameter>other</db:parameter> -</db:methodparam> -<db:modifier>default</db:modifier> -<db:synopsisinfo role="meta">move-assign</db:synopsisinfo> -<db:synopsisinfo role="signature">TestQDoc::Test & operator=(TestQDoc::Test &&other) = default</db:synopsisinfo> -<db:synopsisinfo role="access">public</db:synopsisinfo> -<db:synopsisinfo role="status">active</db:synopsisinfo> -<db:synopsisinfo role="threadsafeness">unspecified</db:synopsisinfo> -</db:methodsynopsis> -<db:para>Move-assigns <db:code role="parameter">other</db:code>.</db:para> -</db:section> <db:section xml:id="funcPtr"> <db:title>Test::void (*)(bool) funcPtr(bool <db:emphasis>b</db:emphasis>, const char *<db:emphasis>s</db:emphasis>)</db:title> <db:methodsynopsis> @@ -246,6 +228,24 @@ </db:methodsynopsis> <db:para>Function that must be reimplemented.</db:para> </db:section> +<db:section xml:id="operator-eq"> +<db:title>[default] Test::TestQDoc::Test &operator=(TestQDoc::Test &&<db:emphasis>other</db:emphasis>)</db:title> +<db:methodsynopsis> +<db:type>TestQDoc::Test &</db:type> +<db:methodname>operator=</db:methodname> +<db:methodparam> +<db:type>TestQDoc::Test &&</db:type> +<db:parameter>other</db:parameter> +</db:methodparam> +<db:modifier>default</db:modifier> +<db:synopsisinfo role="meta">move-assign</db:synopsisinfo> +<db:synopsisinfo role="signature">TestQDoc::Test & operator=(TestQDoc::Test &&other) = default</db:synopsisinfo> +<db:synopsisinfo role="access">public</db:synopsisinfo> +<db:synopsisinfo role="status">active</db:synopsisinfo> +<db:synopsisinfo role="threadsafeness">unspecified</db:synopsisinfo> +</db:methodsynopsis> +<db:para>Move-assigns <db:code role="parameter">other</db:code>.</db:para> +</db:section> </db:section> <db:section xml:id="related-non-members"> <db:title>Related Non-Members</db:title> 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 da7162ed2..248985e4e 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/ignoresince/testqdoc-test.html @@ -47,7 +47,6 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#Test">Test</a></b>()</td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b>(TestQDoc::Test &&<i>other</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void (*)(bool) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b>(bool <i>b</i>, const char *<i>s</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs">methodWithEmDashInItsDocs</a></b>()</td></tr> @@ -55,6 +54,7 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b>(int, int <i>v</i> = 0)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b>(int <i>i</i>, bool <i>b</i> = false)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b>()</td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b>(TestQDoc::Test &&<i>other</i>)</td></tr> </table></div> <h2 id="protected-functions">Protected Functions</h2> <div class="table"><table class="alignedsummary"> @@ -92,10 +92,6 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h3 class="fn" id="Test"><code>[default] </code>Test::<span class="name">Test</span>()</h3> <p>Default constructor.</p> <!-- @@@Test --> -<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& --> -<h3 class="fn" id="operator-eq"><code>[default] </code><span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &&<i>other</i>)</h3> -<p>Move-assigns <i>other</i>.</p> -<!-- @@@operator= --> <!-- $$$funcPtr[overload1]$$$funcPtrboolconstchar* --> <h3 class="fn" id="funcPtr"><span class="type">void</span> (*)(<span class="type">bool</span>) Test::<span class="name">funcPtr</span>(<span class="type">bool</span> <i>b</i>, const <span class="type">char</span> *<i>s</i>)</h3> <p>Returns a pointer to a function that takes a boolean. Uses <i>b</i> and <i>s</i>.</p> @@ -138,6 +134,10 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h3 class="fn" id="virtualFun"><code>[virtual] </code><span class="type">void</span> Test::<span class="name">virtualFun</span>()</h3> <p>Function that must be reimplemented.</p> <!-- @@@virtualFun --> +<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& --> +<h3 class="fn" id="operator-eq"><code>[default] </code><span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &&<i>other</i>)</h3> +<p>Move-assigns <i>other</i>.</p> +<!-- @@@operator= --> </div> <div class="relnonmem"> <h2>Related Non-Members</h2> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived-members.html b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived-members.html index 1b44180f9..7af17e3fa 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/properties/testqdoc-testderived-members.html @@ -16,31 +16,31 @@ <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-typedef">DerivedType</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-typedef">NotTypedef</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#bindableProp-prop">bindableProp</a></b></span>() : QBindable<QString></li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#bindableProp-prop">bindablePropChanged</a></b></span>()</li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#boolProp-prop">boolProp</a></b></span>() : bool</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#boolProp-prop">boolPropChanged</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#emitSomething">emitSomething</a></b></span>()</li> -<li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#boolProp-prop">resetBoolProp</a></b></span>()</li> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#bindableProp-prop">setBindableProp</a></b></span>(const QString &)</li> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#boolProp-prop">setBoolProp</a></b></span>(bool)</li> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#bindableProp-prop">bindableProp</a></b></span>() : QBindable<QString></li> -<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#boolProp-prop">boolProp</a></b></span>() : bool</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b></span>(bool, const char *) : void (*)(bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#intProp-prop">getInt</a></b></span>() : int *</li> -</ul></td><td class="topAlign"><ul> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#id">id</a></b></span>() : int</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#invokeMe">invokeMe</a></b></span>() const</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs">methodWithEmDashInItsDocs</a></b></span>()</li> +</ul></td><td class="topAlign"><ul> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#methodWithEnDashInItsDocs">methodWithEnDashInItsDocs</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#name-prop">name</a></b></span>() const : const QString *</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#overload">overload</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#overload-1">overload</a></b></span>(bool)</li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#boolProp-prop">resetBoolProp</a></b></span>()</li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#bindableProp-prop">setBindableProp</a></b></span>(const QString &)</li> +<li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#boolProp-prop">setBoolProp</a></b></span>(bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b></span>(int, int) : int</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b></span>(int, bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#someProp-prop">someProp</a></b></span>() : const QString &</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#virtualFun">virtualFun</a></b></span>()</li> +<li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> </ul> </td></tr> </table></div> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml index 685d210b4..a44a69f63 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum-docbook/testqdoc-test.xml @@ -207,24 +207,6 @@ </db:constructorsynopsis> <db:para>Default constructor.</db:para> </db:section> -<db:section xml:id="operator-eq"> -<db:title>[default] Test::TestQDoc::Test &operator=(TestQDoc::Test &&<db:emphasis>other</db:emphasis>)</db:title> -<db:methodsynopsis> -<db:type>TestQDoc::Test &</db:type> -<db:methodname>operator=</db:methodname> -<db:methodparam> -<db:type>TestQDoc::Test &&</db:type> -<db:parameter>other</db:parameter> -</db:methodparam> -<db:modifier>default</db:modifier> -<db:synopsisinfo role="meta">move-assign</db:synopsisinfo> -<db:synopsisinfo role="signature">TestQDoc::Test & operator=(TestQDoc::Test &&other) = default</db:synopsisinfo> -<db:synopsisinfo role="access">public</db:synopsisinfo> -<db:synopsisinfo role="status">active</db:synopsisinfo> -<db:synopsisinfo role="threadsafeness">unspecified</db:synopsisinfo> -</db:methodsynopsis> -<db:para>Move-assigns <db:code role="parameter">other</db:code>.</db:para> -</db:section> <db:section xml:id="funcPtr"> <db:title>Test::void (*)(bool) funcPtr(bool <db:emphasis>b</db:emphasis>, const char *<db:emphasis>s</db:emphasis>)</db:title> <db:methodsynopsis> @@ -373,6 +355,24 @@ </db:methodsynopsis> <db:para>Function that must be reimplemented.</db:para> </db:section> +<db:section xml:id="operator-eq"> +<db:title>[default] Test::TestQDoc::Test &operator=(TestQDoc::Test &&<db:emphasis>other</db:emphasis>)</db:title> +<db:methodsynopsis> +<db:type>TestQDoc::Test &</db:type> +<db:methodname>operator=</db:methodname> +<db:methodparam> +<db:type>TestQDoc::Test &&</db:type> +<db:parameter>other</db:parameter> +</db:methodparam> +<db:modifier>default</db:modifier> +<db:synopsisinfo role="meta">move-assign</db:synopsisinfo> +<db:synopsisinfo role="signature">TestQDoc::Test & operator=(TestQDoc::Test &&other) = default</db:synopsisinfo> +<db:synopsisinfo role="access">public</db:synopsisinfo> +<db:synopsisinfo role="status">active</db:synopsisinfo> +<db:synopsisinfo role="threadsafeness">unspecified</db:synopsisinfo> +</db:methodsynopsis> +<db:para>Move-assigns <db:code role="parameter">other</db:code>.</db:para> +</db:section> </db:section> <db:section xml:id="related-non-members"> <db:title>Related Non-Members</db:title> 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 71f71c039..905ccd09d 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html @@ -49,7 +49,6 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#Test">Test</a></b>()</td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b>(TestQDoc::Test &&<i>other</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void (*)(bool) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b>(bool <i>b</i>, const char *<i>s</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs">methodWithEmDashInItsDocs</a></b>()</td></tr> @@ -57,6 +56,7 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b>(int, int <i>v</i> = 0)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b>(int <i>i</i>, bool <i>b</i> = false)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b>()</td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b>(TestQDoc::Test &&<i>other</i>)</td></tr> </table></div> <h2 id="protected-functions">Protected Functions</h2> <div class="table"><table class="alignedsummary"> @@ -112,10 +112,6 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h3 class="fn" id="Test"><code>[default] </code>Test::<span class="name">Test</span>()</h3> <p>Default constructor.</p> <!-- @@@Test --> -<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& --> -<h3 class="fn" id="operator-eq"><code>[default] </code><span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &&<i>other</i>)</h3> -<p>Move-assigns <i>other</i>.</p> -<!-- @@@operator= --> <!-- $$$funcPtr[overload1]$$$funcPtrboolconstchar* --> <h3 class="fn" id="funcPtr"><span class="type">void</span> (*)(<span class="type">bool</span>) Test::<span class="name">funcPtr</span>(<span class="type">bool</span> <i>b</i>, const <span class="type">char</span> *<i>s</i>)</h3> <p>Returns a pointer to a function that takes a boolean. Uses <i>b</i> and <i>s</i>.</p> @@ -156,6 +152,10 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h3 class="fn" id="virtualFun"><code>[virtual] </code><span class="type">void</span> Test::<span class="name">virtualFun</span>()</h3> <p>Function that must be reimplemented.</p> <!-- @@@virtualFun --> +<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& --> +<h3 class="fn" id="operator-eq"><code>[default] </code><span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &&<i>other</i>)</h3> +<p>Move-assigns <i>other</i>.</p> +<!-- @@@operator= --> </div> <div class="relnonmem"> <h2>Related Non-Members</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 f14ce356b..5cfec34e1 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/template/testqdoc-test.html @@ -49,7 +49,6 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#Test">Test</a></b>()</td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b>(TestQDoc::Test &&<i>other</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void (*)(bool) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b>(bool <i>b</i>, const char *<i>s</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs">methodWithEmDashInItsDocs</a></b>()</td></tr> @@ -57,6 +56,7 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b>(int, int <i>v</i> = 0)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b>(int <i>i</i>, bool <i>b</i> = false)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b>()</td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b>(TestQDoc::Test &&<i>other</i>)</td></tr> </table></div> <h2 id="protected-functions">Protected Functions</h2> <div class="table"><table class="alignedsummary"> @@ -99,10 +99,6 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h3 class="fn" id="Test"><code>[default] </code>Test::<span class="name">Test</span>()</h3> <p>Default constructor.</p> <!-- @@@Test --> -<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& --> -<h3 class="fn" id="operator-eq"><code>[default] </code><span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &&<i>other</i>)</h3> -<p>Move-assigns <i>other</i>.</p> -<!-- @@@operator= --> <!-- $$$funcPtr[overload1]$$$funcPtrboolconstchar* --> <h3 class="fn" id="funcPtr"><span class="type">void</span> (*)(<span class="type">bool</span>) Test::<span class="name">funcPtr</span>(<span class="type">bool</span> <i>b</i>, const <span class="type">char</span> *<i>s</i>)</h3> <p>Returns a pointer to a function that takes a boolean. Uses <i>b</i> and <i>s</i>.</p> @@ -147,6 +143,10 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h3 class="fn" id="virtualFun"><code>[virtual] </code><span class="type">void</span> Test::<span class="name">virtualFun</span>()</h3> <p>Function that must be reimplemented.</p> <!-- @@@virtualFun --> +<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& --> +<h3 class="fn" id="operator-eq"><code>[default] </code><span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &&<i>other</i>)</h3> +<p>Move-assigns <i>other</i>.</p> +<!-- @@@operator= --> </div> <div class="relnonmem"> <h2>Related Non-Members</h2> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test-members.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test-members.html index fc136570e..360f3caf3 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test-members.html @@ -14,7 +14,6 @@ <ul> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#Test">Test</a></b></span>()</li> -<li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b></span>(bool, const char *) : void (*)(bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs">methodWithEmDashInItsDocs</a></b></span>()</li> @@ -24,6 +23,7 @@ <li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b></span>(int, int) : int</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b></span>(int, bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b></span>()</li> +<li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> </ul> </body> </html> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html index c45bd2b6a..d5c330b77 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-test.html @@ -47,7 +47,6 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#Test">Test</a></b>()</td></tr> -<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b>(TestQDoc::Test &&<i>other</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void (*)(bool) </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b>(bool <i>b</i>, const char *<i>s</i>)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs">methodWithEmDashInItsDocs</a></b>()</td></tr> @@ -55,6 +54,7 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunction">someFunction</a></b>(int, int <i>v</i> = 0)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b>(int <i>i</i>, bool <i>b</i> = false)</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b>()</td></tr> +<tr><td class="memItemLeft rightAlign topAlign"> TestQDoc::Test &</td><td class="memItemRight bottomAlign"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b>(TestQDoc::Test &&<i>other</i>)</td></tr> </table></div> <h2 id="protected-functions">Protected Functions</h2> <div class="table"><table class="alignedsummary"> @@ -92,10 +92,6 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h3 class="fn" id="Test"><code>[default] </code>Test::<span class="name">Test</span>()</h3> <p>Default constructor.</p> <!-- @@@Test --> -<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& --> -<h3 class="fn" id="operator-eq"><code>[default] </code><span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &&<i>other</i>)</h3> -<p>Move-assigns <i>other</i>.</p> -<!-- @@@operator= --> <!-- $$$funcPtr[overload1]$$$funcPtrboolconstchar* --> <h3 class="fn" id="funcPtr"><span class="type">void</span> (*)(<span class="type">bool</span>) Test::<span class="name">funcPtr</span>(<span class="type">bool</span> <i>b</i>, const <span class="type">char</span> *<i>s</i>)</h3> <p>Returns a pointer to a function that takes a boolean. Uses <i>b</i> and <i>s</i>.</p> @@ -136,6 +132,10 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr> <h3 class="fn" id="virtualFun"><code>[virtual] </code><span class="type">void</span> Test::<span class="name">virtualFun</span>()</h3> <p>Function that must be reimplemented.</p> <!-- @@@virtualFun --> +<!-- $$$operator=[overload1]$$$operator=TestQDoc::Test&& --> +<h3 class="fn" id="operator-eq"><code>[default] </code><span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &Test::<span class="name">operator=</span>(<span class="type"><a href="testqdoc-test.html">TestQDoc::Test</a></span> &&<i>other</i>)</h3> +<p>Move-assigns <i>other</i>.</p> +<!-- @@@operator= --> </div> <div class="relnonmem"> <h2>Related Non-Members</h2> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived-members.html b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived-members.html index 1312856c2..1cd747ed9 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/testqdoc-testderived-members.html @@ -15,7 +15,6 @@ <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#DerivedType-typedef">DerivedType</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#NotTypedef-typedef">NotTypedef</a></b></span></li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#SomeType-typedef">SomeType</a></b></span></li> -<li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#funcPtr">funcPtr</a></b></span>(bool, const char *) : void (*)(bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#inlineFunction">inlineFunction</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#methodWithEmDashInItsDocs">methodWithEmDashInItsDocs</a></b></span>()</li> @@ -26,6 +25,7 @@ <li class="fn"><span class="name"><b><a href="testqdoc-test.html#someFunctionDefaultArg">someFunctionDefaultArg</a></b></span>(int, bool)</li> <li class="fn"><span class="name"><b><a href="testqdoc-test.html#virtualFun">virtualFun</a></b></span>()</li> <li class="fn"><span class="name"><b><a href="testqdoc-testderived.html#virtualFun">virtualFun</a></b></span>()</li> +<li class="fn"><span class="name"><b><a href="testqdoc-test.html#operator-eq">operator=</a></b></span>(TestQDoc::Test &&) : TestQDoc::Test &</li> </ul> </body> </html> |