diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-01-27 23:45:59 +0100 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2020-01-29 09:44:36 +0100 |
commit | cd50765264adac52dc7ace48b0f339c0b13f76fc (patch) | |
tree | 8b79acbe5dc312776119e67da31a1fbe7c949cf1 /tests/auto/qdoc | |
parent | 5eae325fcb4140155fe97ee0dff6101e4a2db444 (diff) |
qdoc: Allow per-example override of install path
The 'examplesinstallpath' configuration variable assumes that all
examples - once installed - are located under a common root path.
Add a parameter 'installpath', recognized by the \meta command,
which can be used for setting the install path for specified
examples.
Improve the test for examples-manifest.xml to cover the \meta
command usage.
Task-number: QTBUG-81360
Change-Id: Ibb525a48958005fb3a589ef2d9d212091829231f
Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests/auto/qdoc')
6 files changed, 47 insertions, 5 deletions
diff --git a/tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf b/tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf index 816d1d1a4..b4598476e 100644 --- a/tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf +++ b/tests/auto/qdoc/generatedoutput/examples-qhp.qdocconf @@ -1,6 +1,8 @@ # QML test includes a documented example include(testqml.qdocconf) +examplesinstallpath = test + # Configure .qhp generation qhp.projects = Test diff --git a/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml b/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml index 330923033..7f206d0e8 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <instructionals module="Test"> <examples> - <example name="QML Documentation Example" docUrl="qthelp://org.qt-project.test.001/test/test-componentset-example.html" isTest="true"> - <description><![CDATA[No description available]]></description> - <tags>documentation,qml,test</tags> + <example name="QML Documentation Example" docUrl="qthelp://org.qt-project.test.001/test/test-componentset-example.html" projectPath="tutorials/componentset/componentset.pro" isTest="true"> + <description><![CDATA[Example for documenting QML types.]]></description> + <tags>documentation,qml,sample,test</tags> </example> </examples> </instructionals> 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 8689d2e76..29ed944ba 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 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <WebXML> <document> - <page name="componentset" href="test-componentset-example.html" status="active" location="examples.qdoc" filepath="/home/levon/work/official/qttools/tests/auto/qdoc/generatedoutput/examples.qdoc" lineno="28" documented="true" subtype="example" title="QML Documentation Example" fulltitle="QML Documentation Example" subtitle="" module="Test"> + <page name="componentset" href="test-componentset-example.html" status="active" location="examples.qdoc" filepath="/home/levon/work/official/qttools/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc" lineno="28" documented="true" subtype="example" title="QML Documentation Example" fulltitle="QML Documentation Example" subtitle="" module="Test" brief="Example for documenting QML types"> <contents name="qml-class" title="QML Class" level="1"/> <contents name="properties-signals-handlers-and-methods" title="Properties, Signals, Handlers, and Methods" level="1"/> <contents name="internal-documentation" title="Internal Documentation" level="2"/> <contents name="qml-types-with-c-implementation" title="QML Types with C++ Implementation" level="1"/> - <description path="/home/levon/work/official/qttools/tests/auto/qdoc/generatedoutput/examples.qdoc" line="28" column="4"> + <description path="/home/levon/work/official/qttools/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc" line="28" column="4"> + <brief>Example for documenting QML types.</brief> <para>This example demonstrates one of the ways to document QML types.</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> @@ -32,6 +33,29 @@ An aliased property of type int.</code> <heading level="1">QML Types with C++ Implementation</heading> <para>This example only demonstrates the documentation for types in QML files, but the regular QML commands may be placed inside C++ classes to define the public API of the QML type.</para> </section> + <para>Files:</para> + <list type="bullet"> + <item> + <para> + <link raw="componentset/ProgressBar.qml" href="test-componentset-progressbar-qml.html" type="page" page="ProgressBar.qml Example File">componentset/ProgressBar.qml</link> + </para> + </item> + <item> + <para> + <link raw="componentset/Switch.qml" href="test-componentset-switch-qml.html" type="page" page="Switch.qml Example File">componentset/Switch.qml</link> + </para> + </item> + <item> + <para> + <link raw="componentset/TabWidget.qml" href="test-componentset-tabwidget-qml.html" type="page" page="TabWidget.qml Example File">componentset/TabWidget.qml</link> + </para> + </item> + <item> + <para> + <link raw="componentset/componentset.pro" href="test-componentset-componentset-pro.html" type="page" page="componentset.pro Example File">componentset/componentset.pro</link> + </para> + </item> + </list> </description> </page> </document> 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 faf632bea..8b792090f 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/test-componentset-example.html @@ -19,6 +19,9 @@ <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QML Documentation Example</h1> <span class="subtitle"></span> +<!-- $$$componentset-brief --> +<p>Example for documenting QML types.</p> +<!-- @@@componentset --> <!-- $$$componentset-description --> <div class="descr"> <a name="details"></a> <p>This example demonstrates one of the ways to document QML types.</p> @@ -42,6 +45,13 @@ An aliased property of type <span class="type">int</span><span class="operator"> <a name="qml-types-with-c-implementation"></a> <h4 id="qml-types-with-c-implementation">QML Types with C++ Implementation</h4> <p>This example only demonstrates the documentation for types in QML files, but the regular QML commands may be placed inside C++ classes to define the public API of the QML type.</p> +<p>Files:</p> +<ul> +<li><a href="test-componentset-progressbar-qml.html">componentset/ProgressBar.qml</a></li> +<li><a href="test-componentset-switch-qml.html">componentset/Switch.qml</a></li> +<li><a href="test-componentset-tabwidget-qml.html">componentset/TabWidget.qml</a></li> +<li><a href="test-componentset-componentset-pro.html">componentset/componentset.pro</a></li> +</ul> </div> <!-- @@@componentset --> </body> diff --git a/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc b/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc index 7c780eca8..2f56c221c 100644 --- a/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc +++ b/tests/auto/qdoc/generatedoutput/qml/componentset/examples.qdoc @@ -28,6 +28,10 @@ /*! \example componentset \title QML Documentation Example + \brief Example for documenting QML types. + + \meta tag {test,sample} + \meta installpath tutorials This example demonstrates one of the ways to document QML types. diff --git a/tests/auto/qdoc/generatedoutput/testqml.qdocconf b/tests/auto/qdoc/generatedoutput/testqml.qdocconf index c469bde06..f618fe1b8 100644 --- a/tests/auto/qdoc/generatedoutput/testqml.qdocconf +++ b/tests/auto/qdoc/generatedoutput/testqml.qdocconf @@ -16,5 +16,7 @@ excludedirs = ./bug80259 sources.fileextensions = "*.qml *.cpp *.qdoc" headers.fileextensions = "*.h" +examples.fileextensions = "*.qml" + macro.begincomment = "\\c{/*}" macro.QDocTestVer = "1.1" |