diff options
author | Paul Wicking <paul.wicking@qt.io> | 2020-04-22 16:31:56 +0200 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2020-09-04 17:16:06 +0200 |
commit | f370f85878391bc5c51db8473c33304080e003b9 (patch) | |
tree | 6f7391297a031aed2fe45d695b65df739aa640b7 /tests | |
parent | a5adf455e66f210d54069f976780f2f9695ffc8f (diff) |
QDoc: Warn about missing example properties
[ChangeLog][qdoc] QDoc now warns about missing example properties.
Fixes: QTBUG-37648
Change-Id: I0ab857e71ae3449ee976dc57e09b82d14d47fb0f
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'tests')
16 files changed, 20 insertions, 10 deletions
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/demos-manifest.xml b/tests/auto/qdoc/generatedoutput/expected_output/demos-manifest.xml index d83906f44..bdbdb688b 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/demos-manifest.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/demos-manifest.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <instructionals module="Test"> <demos> - <demo name="Demo" docUrl="qthelp://org.qt-project.test.001/test/test-demos-demo-example.html" projectPath="test/demos/demo/demo.pro" isTest="true"> + <demo name="Demo" docUrl="qthelp://org.qt-project.test.001/test/test-demos-demo-example.html" projectPath="test/demos/demo/demo.pro" imageUrl="qthelp://org.qt-project.test.001/test/images/leonardo-da-vinci.png" isTest="true"> <description><![CDATA[No description available]]></description> <tags>demo,test</tags> </demo> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml index 48496733b..d65d81fe1 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml @@ -8,7 +8,7 @@ <db:para>Example for documenting QML types.</db:para> </db:abstract> </db:info> -<db:para>This example demonstrates one of the ways to document QML types.</db:para> +<db:para>This example demonstrates one of the ways to document QML types. It also generates a warning about a missing example image, on purpose.</db:para> <db:para>In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types and their public interfaces. The types are grouped into a module, the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module.</db:para> <db:para>The uicomponents.qdoc file generates the overview page for the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module page.</db:para> <db:para>The generated documentation is available in the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module.</db:para> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml b/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml index 8aa9ce303..b528755a8 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <instructionals module="Test"> <examples> - <example name="CMake Example Project" docUrl="qthelp://org.qt-project.test.001/test/test-cmaketest-example.html" projectPath="test/cmaketest/CMakeLists.txt" isTest="true"> + <example name="CMake Example Project" docUrl="qthelp://org.qt-project.test.001/test/test-cmaketest-example.html" projectPath="test/cmaketest/CMakeLists.txt" imageUrl="qthelp://org.qt-project.test.001/test/images/leonardo-da-vinci.png" isTest="true"> <description><![CDATA[No description available]]></description> <tags>cmake,project,test</tags> <fileToOpen mainFile="true">test/cmaketest/main.cpp</fileToOpen> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml b/tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml index 515ef7bf1..a5f3a2577 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml +++ b/tests/auto/qdoc/generatedoutput/expected_output/html/test-componentset-example.webxml @@ -8,7 +8,7 @@ <contents name="qml-types-with-c-implementation" title="QML Types with C++ Implementation" level="1"/> <description> <brief>Example for documenting QML types.</brief> - <para>This example demonstrates one of the ways to document QML types.</para> + <para>This example demonstrates one of the ways to document QML types. It also generates a warning about a missing example image, on purpose.</para> <para>In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types and their public interfaces. The types are grouped into a module, the <link raw="UI Components" href="uicomponents-qmlmodule.html" type="">UI Components</link> module.</para> <para>The uicomponents.qdoc file generates the overview page for the <link raw="UI Components" href="uicomponents-qmlmodule.html" type="">UI Components</link> module page.</para> <para>The generated documentation is available in the <link raw="UI Components" href="uicomponents-qmlmodule.html" type="">UI Components</link> module.</para> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/noautolist-docbook/test-componentset-example.xml b/tests/auto/qdoc/generatedoutput/expected_output/noautolist-docbook/test-componentset-example.xml index 4e1dbf915..062d7cdf0 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/noautolist-docbook/test-componentset-example.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/noautolist-docbook/test-componentset-example.xml @@ -8,7 +8,7 @@ <db:para>Example for documenting QML types.</db:para> </db:abstract> </db:info> -<db:para>This example demonstrates one of the ways to document QML types.</db:para> +<db:para>This example demonstrates one of the ways to document QML types. It also generates a warning about a missing example image, on purpose.</db:para> <db:para>In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types and their public interfaces. The types are grouped into a module, the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module.</db:para> <db:para>The uicomponents.qdoc file generates the overview page for the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module page.</db:para> <db:para>The generated documentation is available in the <db:link xlink:href="uicomponents-qmlmodule.xml">UI Components</db:link> module.</db:para> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/noautolist/test-componentset-example.html b/tests/auto/qdoc/generatedoutput/expected_output/noautolist/test-componentset-example.html index 5331c2b35..385f284fc 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/noautolist/test-componentset-example.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/noautolist/test-componentset-example.html @@ -24,7 +24,7 @@ <!-- @@@componentset --> <!-- $$$componentset-description --> <div class="descr"> <a name="details"></a> -<p>This example demonstrates one of the ways to document QML types.</p> +<p>This example demonstrates one of the ways to document QML types. It also generates a warning about a missing example image, on purpose.</p> <p>In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types and their public interfaces. The types are grouped into a module, the <a href="uicomponents-qmlmodule.html">UI Components</a> module.</p> <p>The uicomponents.qdoc file generates the overview page for the <a href="uicomponents-qmlmodule.html">UI Components</a> module page.</p> <p>The generated documentation is available in the <a href="uicomponents-qmlmodule.html">UI Components</a> module.</p> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/test-cmaketest-example.html b/tests/auto/qdoc/generatedoutput/expected_output/test-cmaketest-example.html index dc123674d..3c3987041 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/test-cmaketest-example.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/test-cmaketest-example.html @@ -11,7 +11,7 @@ <span class="subtitle"></span> <!-- $$$cmaketest-description --> <div class="descr"> <a name="details"></a> -<p>Files:</p> +<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p><p>Files:</p> <ul> <li><a href="test-cmaketest-cmakelists-txt.html">cmaketest/CMakeLists.txt</a></li> <li><a href="test-cmaketest-main-cpp.html">cmaketest/main.cpp</a></li> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html b/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html index 8b792090f..976f07c1c 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html @@ -24,7 +24,7 @@ <!-- @@@componentset --> <!-- $$$componentset-description --> <div class="descr"> <a name="details"></a> -<p>This example demonstrates one of the ways to document QML types.</p> +<p>This example demonstrates one of the ways to document QML types. It also generates a warning about a missing example image, on purpose.</p> <p>In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types and their public interfaces. The types are grouped into a module, the <a href="uicomponents-qmlmodule.html">UI Components</a> module.</p> <p>The uicomponents.qdoc file generates the overview page for the <a href="uicomponents-qmlmodule.html">UI Components</a> module page.</p> <p>The generated documentation is available in the <a href="uicomponents-qmlmodule.html">UI Components</a> module.</p> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/test.qhp b/tests/auto/qdoc/generatedoutput/expected_output/test.qhp index 6bad3c940..8d701a0e7 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/test.qhp +++ b/tests/auto/qdoc/generatedoutput/expected_output/test.qhp @@ -116,6 +116,7 @@ <keyword name="virtualFun" id="TestDerived::virtualFun" ref="testqdoc-testderived.html#virtualFun"/> </keywords> <files> + <file>images/leonardo-da-vinci.png</file> <file>qdoc-test-qmlmodule.html</file> <file>qml-int.html</file> <file>qml-qdoc-test-abstractparent-members.html</file> diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf index 31775942b..34042c600 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf +++ b/tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf @@ -1,5 +1,8 @@ # Shared configuration for all tests +# images +imagedirs = ../images + # zero warning policy warninglimit = 0 warninglimit.enabled = true diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/testqml.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/testqml.qdocconf index cdd4829c2..0673d4891 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/configs/testqml.qdocconf +++ b/tests/auto/qdoc/generatedoutput/testdata/configs/testqml.qdocconf @@ -21,3 +21,5 @@ examples.fileextensions = "*.qml *.cpp" macro.begincomment = "\\c{/*}" macro.QDocTestVer = "1.1" + +warninglimit += 1 diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/webxml_testqml.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/webxml_testqml.qdocconf index 8dbbfd860..537685700 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/configs/webxml_testqml.qdocconf +++ b/tests/auto/qdoc/generatedoutput/testdata/configs/webxml_testqml.qdocconf @@ -1,3 +1,2 @@ -include(config.qdocconf) include(testqml.qdocconf) include(webxml.qdocconf) diff --git a/tests/auto/qdoc/generatedoutput/testdata/examples/demos/demo/doc/src/demo.qdoc b/tests/auto/qdoc/generatedoutput/testdata/examples/demos/demo/doc/src/demo.qdoc index 08b609126..de7160ee4 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/examples/demos/demo/doc/src/demo.qdoc +++ b/tests/auto/qdoc/generatedoutput/testdata/examples/demos/demo/doc/src/demo.qdoc @@ -29,4 +29,6 @@ /*! \example demos/demo \title Demo + \image leonardo-da-vinci.png + //! Icon made by Smashicons from www.flaticon.com */ diff --git a/tests/auto/qdoc/generatedoutput/testdata/images/leonardo-da-vinci.png b/tests/auto/qdoc/generatedoutput/testdata/images/leonardo-da-vinci.png Binary files differnew file mode 100644 index 000000000..854acb4ca --- /dev/null +++ b/tests/auto/qdoc/generatedoutput/testdata/images/leonardo-da-vinci.png diff --git a/tests/auto/qdoc/generatedoutput/testdata/qml/cmaketest/doc/src/cmaketest.qdoc b/tests/auto/qdoc/generatedoutput/testdata/qml/cmaketest/doc/src/cmaketest.qdoc index 13767e147..e60f3b9e8 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/qml/cmaketest/doc/src/cmaketest.qdoc +++ b/tests/auto/qdoc/generatedoutput/testdata/qml/cmaketest/doc/src/cmaketest.qdoc @@ -29,4 +29,6 @@ /*! \example cmaketest \title CMake Example Project + \image leonardo-da-vinci.png + //! Icon made by Smashicons from www.flaticon.com */ diff --git a/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc b/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc index 5813b1247..9ca0db891 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc +++ b/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc @@ -35,7 +35,8 @@ \meta tag {test,sample} \meta installpath tutorials - This example demonstrates one of the ways to document QML types. + This example demonstrates one of the ways to document QML types. It also + generates a warning about a missing example image, on purpose. In particular, there are sample types that are documented with QDoc commands comments. There are documentation comments for the QML types |