diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-10-27 23:48:22 +0100 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2020-10-28 09:59:00 +0100 |
commit | da5b8d012259375543b967e5e12aa6066595ac22 (patch) | |
tree | 6a56bed627387f932ef5e0c4c51cbe36f38ba3b4 /tests | |
parent | d346286c872b55d9bb1657f4c5be9c7f9084712d (diff) |
qdoc: Fix issues in \include command
- 'sources' configuration variable was not considered when searching
for file to include.
- An empty QString was pushed to the location stack in
DocParser::include(), resulting in vague warning messages
- The search algorithm chose the first path that ended in the
filename to find, with the potential of incorrectly choosing
'foobar.cpp' over 'bar.cpp'.
Fixes: QTBUG-86844
Change-Id: If180ffe0817b2e786356b49f7e679e158fbc407d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests')
8 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml index 604e577df..065421b2d 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/testcpp-module.xml @@ -39,5 +39,8 @@ </db:section> <db:section xml:id="details"> <db:title>Detailed Description</db:title> +<db:note> +<db:para>This is just a test.</db:para> +</db:note> </db:section> </db:article> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/nestedmacro/testcpp-module.html b/tests/auto/qdoc/generatedoutput/expected_output/nestedmacro/testcpp-module.html index 6ab4d245b..3c49781e4 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/nestedmacro/testcpp-module.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/nestedmacro/testcpp-module.html @@ -36,6 +36,7 @@ <a name="details"></a> <div class="descr"> <h2 id="details">Detailed Description</h2> +<p><b>Note: </b>This is just a test.</p> <p><b>This module was introduced in version 5.15.</b></p> </div> <!-- @@@TestCPP --> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/noautolist-docbook/testcpp-module.xml b/tests/auto/qdoc/generatedoutput/expected_output/noautolist-docbook/testcpp-module.xml index d2ba83a13..33ceec53c 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/noautolist-docbook/testcpp-module.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/noautolist-docbook/testcpp-module.xml @@ -11,5 +11,8 @@ <db:para>A test module page.</db:para> <db:section xml:id="details"> <db:title>Detailed Description</db:title> +<db:note> +<db:para>This is just a test.</db:para> +</db:note> </db:section> </db:article> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/noautolist/testcpp-module.html b/tests/auto/qdoc/generatedoutput/expected_output/noautolist/testcpp-module.html index 8108b0979..f273e6f71 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/noautolist/testcpp-module.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/noautolist/testcpp-module.html @@ -23,6 +23,7 @@ <a name="details"></a> <div class="descr"> <h2 id="details">Detailed Description</h2> +<p><b>Note: </b>This is just a test.</p> </div> <!-- @@@TestCPP --> </body> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/testcpp-module.html b/tests/auto/qdoc/generatedoutput/expected_output/testcpp-module.html index 60bbd587c..5a7f6a941 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/testcpp-module.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/testcpp-module.html @@ -36,6 +36,7 @@ <a name="details"></a> <div class="descr"> <h2 id="details">Detailed Description</h2> +<p><b>Note: </b>This is just a test.</p> </div> <!-- @@@TestCPP --> </body> diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf index 094545756..d69f11aff 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf +++ b/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf @@ -4,6 +4,7 @@ includepaths += -I../testcpp headers = ../testcpp/testcpp.h sources = ../testcpp/testcpp.cpp +exampledirs = ../testcpp/snippets macro.CMDFN = \\\\fn macro.nothing = \\dontdocument () diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/snippets/snippet_testcpp.cpp b/tests/auto/qdoc/generatedoutput/testdata/testcpp/snippets/snippet_testcpp.cpp new file mode 100644 index 000000000..1660fbc2b --- /dev/null +++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/snippets/snippet_testcpp.cpp @@ -0,0 +1,3 @@ +//! [random tag] +You're not supposed to see this. +//! [random tag] diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp index e025355af..750941aef 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp +++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp @@ -29,6 +29,12 @@ namespace TestQDoc { +/* +//! [random tag] +\note This is just a test. +//! [random tag] +*/ + /*! \module TestCPP \qtvariable testcpp @@ -38,6 +44,8 @@ namespace TestQDoc { \testnoautolist + \include testcpp.cpp random tag + \if defined(test_nestedmacro) \versionnote {module} {\ver} \endif |