diff options
author | Topi Reinio <topi.reinio@qt.io> | 2021-05-10 23:17:59 +0200 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2021-05-12 11:08:05 +0200 |
commit | c3f59a2a7dc81622ab3fde30a5b8409f423426d0 (patch) | |
tree | f6a6bc1936d95b5f96e44744b573600f4b312d6f /tests | |
parent | 5d5fd7de6ecc21d3a642e1e55c5282b60a08fc6b (diff) |
qdoc: Skip multi-line descriptions of enum values marked with \omitvalue
Previous method did not correctly handle multi-line descriptions for
enum values omitted from the documentation which we have multiple
instances of in the source. These description paragraphs are now
skipped entirely.
After \omitvalue, skip all content until a new paragraph, a \value
command, or another \omitvalue.
Pick-to: 6.1
Task-number: QTBUG-92386
Change-Id: If9284ad2936019bc9afbfaa7cbf5cfbdbdd3cfa4
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests')
4 files changed, 15 insertions, 4 deletions
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 d039a4cb6..7105cc7da 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 @@ -99,6 +99,8 @@ <db:enumitem db:enumidentifier="That" db:enumvalue="0x02"/> <db:enumitem db:enumidentifier="All" db:enumvalue="This | That"/> <db:enumitem db:enumidentifier="OmittedValue" db:enumvalue="99"/> +<db:enumitem db:enumidentifier="UselessValue" db:enumvalue="100"/> +<db:enumitem db:enumidentifier="VeryLastValue" db:enumvalue="101"/> </db:enumsynopsis> <db:informaltable> <db:thead> @@ -136,6 +138,7 @@ </db:td> </db:tr> </db:informaltable> +<db:para>A scoped enum.</db:para> </db:section> <db:section xml:id="SomeType-typedef"> <db:title>Test::SomeType</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 6763017b1..7eba4bbe1 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html @@ -78,13 +78,14 @@ target_link_libraries(mytarget PRIVATE Qt6::QDocTest)</td></tr><tr><td class="me <tr><td class="topAlign"><code>TestQDoc::Test::Partner</code></td><td class="topAlign tblval"><code>3</code></td></tr> </table></div> <!-- @@@ClassicEnum --> -<!-- $$$ScopedEnum$$$This$$$That$$$All$$$OmittedValue --> +<!-- $$$ScopedEnum$$$This$$$That$$$All$$$OmittedValue$$$UselessValue$$$VeryLastValue --> <h3 class="fn" id="ScopedEnum-enum">enum class Test::<span class="name">ScopedEnum</span></h3> <div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr> <tr><td class="topAlign"><code>TestQDoc::Test::ScopedEnum::This</code></td><td class="topAlign tblval"><code>0x01</code></td><td class="topAlign">Something</td></tr> <tr><td class="topAlign"><code>TestQDoc::Test::ScopedEnum::That</code></td><td class="topAlign tblval"><code>0x02</code></td><td class="topAlign">Something else</td></tr> <tr><td class="topAlign"><code>TestQDoc::Test::ScopedEnum::All</code></td><td class="topAlign tblval"><code>This | That</code></td><td class="topAlign">Everything</td></tr> </table></div> +<p>A scoped enum.</p> <!-- @@@ScopedEnum --> <!-- $$$SomeType --> <h3 class="fn" id="SomeType-typedef">Test::<span class="name">SomeType</span></h3> diff --git a/tests/auto/qdoc/generatedoutput/testdata/scopedenum/scopedenum.qdoc b/tests/auto/qdoc/generatedoutput/testdata/scopedenum/scopedenum.qdoc index 1b1363db4..e5937f258 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/scopedenum/scopedenum.qdoc +++ b/tests/auto/qdoc/generatedoutput/testdata/scopedenum/scopedenum.qdoc @@ -39,9 +39,14 @@ \value This Something \value That Something else - \omitvalue OmittedValue - This decription is omitted + \omitvalue OmittedValue \omit Unused - + This decription is omitted \endomit \value All Everything + \omitvalue VeryLastValue + Nothing here + \omitvalue UselessValue + + A scoped enum. */ /*! diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h index 5fb323eed..e8a294120 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h +++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.h @@ -54,7 +54,9 @@ using Specialized = Struct<int, T>; This = 0x01, That = 0x02, All = This | That, - OmittedValue = 99 + OmittedValue = 99, + UselessValue, + VeryLastValue }; #endif typedef struct { |