summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-03-10 23:53:29 +0100
committerTopi Reiniƶ <topi.reinio@qt.io>2020-03-11 11:11:03 +0000
commit76cc799cd2d7305afc8375a2bddbcff0ef4e18c2 (patch)
treeba7bedb062512d45470a119e0762e1502ea7b2d8
parent389c544adaf005d6f205486d0470ccaf945f19f0 (diff)
Enforce zero warnings for QDoc's generatedoutput autotest
Fix all QDoc warnings for the tests and set the warning limit to zero. If any warnings are introduced, QDoc will exit with non-zero value and the test will fail. The exceptions are the tests specific to the DocBook generator, where we expect to see two warnings related to shared comment nodes. The generator currently has trouble handling these. Fixes: QTBUG-82808 Change-Id: I0482516e1e34b92592d921a4a0ffb41e4b2b4770 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/test-componentset-example.xml14
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html2
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html3
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html14
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf4
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf4
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf5
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc14
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf2
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc15
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc18
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp2
13 files changed, 54 insertions, 45 deletions
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 2b442d1dd..48496733b 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
@@ -10,29 +10,29 @@
</db:info>
<db:para>This example demonstrates one of the ways to document QML types.</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 <db:link xlink:href="">uicomponents.qdoc</db:link> 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 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>
<db:section xml:id="qml-class">
<db:title>QML Class</db:title>
-<db:para>The QML types use the <db:link xlink:href="">\qmltype</db:link> to document the type. In addition, they have the <db:link xlink:href="">\inmodule</db:link> command in order for QDoc to associate them to the <db:code>UIComponents</db:code> module.</db:para>
-<db:para>QDoc uses the <db:link xlink:href="">\brief</db:link> command to place a basic description when listing the types.</db:para>
+<db:para>The QML types use the \qmltype to document the type. In addition, they have the \inmodule command in order for QDoc to associate them to the <db:code>UIComponents</db:code> module.</db:para>
+<db:para>QDoc uses the \brief command to place a basic description when listing the types.</db:para>
</db:section>
<db:section xml:id="properties-signals-handlers-and-methods">
<db:title>Properties, Signals, Handlers, and Methods</db:title>
<db:para>The types have their properties, signals, handlers, and methods defined in their respective QML files. QDoc associates the properties and methods to the types, therefore, you only need to place the documentation above the property, method, or signal.</db:para>
-<db:para>To document the type of a <db:emphasis>property alias</db:emphasis>, you must use the <db:link xlink:href="">\qmlproperty</db:link> command to specify the data type.</db:para>
+<db:para>To document the type of a <db:emphasis>property alias</db:emphasis>, you must use the \qmlproperty command to specify the data type.</db:para>
<db:programlisting language="cpp">\qmlproperty &lt;@type&gt;int&lt;/@type&gt; anAliasedProperty
An aliased property of type &lt;@type&gt;int&lt;/@type&gt;&lt;@op&gt;.&lt;/@op&gt;
</db:programlisting>
<db:section xml:id="internal-documentation">
<db:title>Internal Documentation</db:title>
-<db:para>You may declare that a documentation is for internal use by placing the <db:link xlink:href="">\internal</db:link> command after the beginning QDoc comment <db:code>/*</db:code>. QDoc will prevent the internal documentation from appearing in the public API.</db:para>
-<db:para>If you wish to omit certain parts of the documentation, you may use the <db:link xlink:href="">\omit</db:link> and <db:link xlink:href="">\endomit</db:link> command.</db:para>
+<db:para>You may declare that a documentation is for internal use by placing the \internal command after the beginning QDoc comment <db:code>/*</db:code>. QDoc will prevent the internal documentation from appearing in the public API.</db:para>
+<db:para>If you wish to omit certain parts of the documentation, you may use the \omit and \endomit command.</db:para>
</db:section>
</db:section>
<db:section xml:id="qml-types-with-c-implementation">
<db:title>QML Types with C++ Implementation</db:title>
-<db:para>This example only demonstrates the documentation for types in QML files, but the regular <db:link xlink:href="">QML commands</db:link> may be placed inside C++ classes to define the public API of the QML type.</db:para>
+<db: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.</db:para>
</db:section>
<db:para>Files:</db:para>
<db:itemizedlist><db:listitem>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
index f43890289..f00b3d3f7 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/uicomponents-qmlmodule.xml
@@ -9,7 +9,7 @@
</db:abstract>
</db:info>
<db:anchor xml:id="details"/>
-<db:para>This is a listing of a list of UI components implemented by QML types. These files are available for general import and they are based on the <db:link xlink:href="">Qt Quick Code Samples</db:link>.</db:para>
+<db:para>This is a listing of a list of UI components implemented by QML types. These files are available for general import and they are based on the Qt Quick Code Samples.</db:para>
<db:para>This module is part of the <db:link xlink:href="test-componentset-example.xml">UIComponents</db:link> example.</db:para>
<db:variablelist role="members">
<db:varlistentry>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html
index d1fb02484..fd9fdd50a 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/index.html
@@ -20,6 +20,8 @@
<h2 id="qml-types">QML Types</h2>
<div class="table"><table class="annotated">
<tr class="odd topAlign"><td class="tblName"><p><a href="qml-qdoc-test-abstractparent.html">AbstractParent</a></p></td><td class="tblDescr"><p>Abstract base QML type</p></td></tr>
+<tr class="even topAlign"><td class="tblName"><p><a href="qml-qdoc-test-child.html">Child</a></p></td><td class="tblDescr"><p>A Child inheriting its parent</p></td></tr>
+<tr class="odd topAlign"><td class="tblName"><p><a href="qml-int.html">int</a></p></td><td class="tblDescr"><p>An integer basic type</p></td></tr>
</table></div>
<p>Test include file that is part of the sourcedirs.</p>
</div>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html
index 48c8fa485..f9d64de75 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent-members.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
-<!-- parent.qdoc -->
+<!-- includefromparent.qdoc -->
<title>List of All Members for AbstractParent | Test</title>
</head>
<body>
@@ -11,7 +11,6 @@
<p>This is the complete list of members for <a href="qml-qdoc-test-abstractparent.html">AbstractParent</a>, including inherited members.</p>
<ul>
<li class="fn"><b><b><a href="qml-qdoc-test-abstractparent.html#children-prop">children</a></b></b> : list&lt;Child&gt; [default]</li>
-<li class="fn">void <b><b><a href="qml-qdoc-test-abstractparent.html#rear-method-1">rear</a></b></b>(<i>child</i>)</li>
<li class="fn">void <b><b><a href="qml-qdoc-test-abstractparent.html#rear-method">rear</a></b></b>(<i>child</i>)</li>
</ul>
</body>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html
index cbb0f36aa..f7c294ae0 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/includefromexampledirs/qml-qdoc-test-abstractparent.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
-<!-- parent.qdoc -->
+<!-- includefromparent.qdoc -->
<title>AbstractParent QML Type | Test</title>
</head>
<body>
@@ -34,12 +34,12 @@
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
-<li class="fn">void <b><b><a href="qml-qdoc-test-abstractparent.html#rear-method-1">rear</a></b></b>(<i>child</i>)</li>
<li class="fn">void <b><b><a href="qml-qdoc-test-abstractparent.html#rear-method">rear</a></b></b>(<i>child</i>)</li>
</ul>
<!-- $$$AbstractParent-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
+<p>Test include file that is part of the sourcedirs.</p>
<!-- @@@AbstractParent -->
<h2>Property Documentation</h2>
<!-- $$$children -->
@@ -54,16 +54,6 @@
</div></div><!-- @@@children -->
<br/>
<h2>Method Documentation</h2>
-<!-- $$$rear$$$rear -->
-<div class="qmlitem"><div class="qmlproto">
-<div class="table"><table class="qmlname">
-<tr valign="top" class="odd" id="rear-method-1">
-<td class="tblQmlFuncNode"><p>
-<a name="rear-method-1"></a><span class="type">void</span> <span class="name">rear</span>(<i>child</i>)</p></td></tr>
-</table></div></div>
-<div class="qmldoc"><p>Do some abstract parenting on <i>child</i>.</p>
-</div></div><!-- @@@rear -->
-<br/>
<!-- $$$rear[overload1]$$$rear -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
index 6fe708176..68afd29e8 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/docbook.qdocconf
@@ -1,3 +1,7 @@
outputformats = DocBook
DocBook.nosubdirs = true
DocBook.outputsubdir = docbook
+
+# TODO: DocBook generator has trouble handling shared comment nodes
+# allow two warnings related to these
+warninglimit = 2
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf
index f6473ccf7..e4cef822e 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/test.qdocconf
@@ -6,3 +6,7 @@ sources = ../outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
macro.beginqdoc = "\\c {/*!}"
macro.endqdoc = "\\c */"
+
+# zero warning tolerance
+warninglimit = 0
+warninglimit.enabled = true
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf
index ff10ae4be..b07aa71c0 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/testcpp.qdocconf
@@ -5,4 +5,9 @@ headers = ../testcpp/testcpp.h
sources = ../testcpp/testcpp.cpp
macro.CMDFN = \\\\fn
+macro.nothing = \\dontdocument ()
locationinfo = false
+
+# zero warning tolerance
+warninglimit = 0
+warninglimit.enabled = true
diff --git a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc
index c95e22125..4933bc4bd 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/excludes/parentinclude.qdoc
@@ -29,6 +29,7 @@
/*!
//! abstract-type
\qmltype AbstractParent
+ \inqmlmodule QDoc.Test
\ingroup qmltypes
\qmlabstract
\brief Abstract base QML type.
@@ -49,16 +50,3 @@
\brief Do some abstract parenting on \a child.
//! rear-qmlmethod
*/
-
-/*!
- \qmltype Child
- \ingroup qmltypes
- \inherits AbstractParent
- \brief A Child inheriting its parent.
-*/
-
-/*!
- \qmlbasictype int
- \ingroup qmltypes
- \brief An integer basic type.
-*/
diff --git a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf
index 1d981deb2..d64985942 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/includefromexampledirs.qdocconf
@@ -5,6 +5,8 @@ sourcedirs += src
excludedirs += excludes \
../qml/componentset
+excludefiles += ../qml/parent.qdoc
+
exampledirs += excludes
HTML.nosubdirs = true
diff --git a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc
index 7b4c00b76..a9a526c64 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/includefromexampledirs/src/includefromparent.qdoc
@@ -49,3 +49,18 @@
\include parent.qdocinc
*/
+
+/*!
+ \qmltype Child
+ \inqmlmodule QDoc.Test
+ \ingroup qmltypes
+ \inherits AbstractParent
+ \brief A Child inheriting its parent.
+*/
+
+/*!
+ \qmlbasictype int
+ \inqmlmodule QDoc.Test
+ \ingroup qmltypes
+ \brief An integer basic type.
+*/
diff --git a/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc b/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc
index 2f56c221c..0816e624c 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/qml/componentset/examples.qdoc
@@ -40,18 +40,18 @@
and their public interfaces. The types are grouped into a module, the
\l{UI Components} module.
- The \l{componentset/uicomponents.qdoc.sample}{uicomponents.qdoc} file generates
+ The uicomponents.qdoc file generates
the overview page for the \l{UI Components} module page.
The generated documentation is available in the \l{UI Components} module.
\section1 QML Class
- The QML types use the \l{qmltype-command}{\\qmltype} to document the
- type. In addition, they have the \l{inmodule-command}{\\inmodule}
+ The QML types use the \\qmltype to document the
+ type. In addition, they have the \\inmodule
command in order for QDoc to associate them to the \c UIComponents module.
- QDoc uses the \l{brief-command}{\\brief} command to place a basic
+ QDoc uses the \\brief command to place a basic
description when listing the types.
\section1 Properties, Signals, Handlers, and Methods
@@ -62,7 +62,7 @@
documentation above the property, method, or signal.
To document the type of a \e {property alias}, you must use the
- \l{qmlproperty-command}{\\qmlproperty} command to specify the data type.
+ \\qmlproperty command to specify the data type.
\code
\qmlproperty int anAliasedProperty
@@ -72,17 +72,17 @@
\section2 Internal Documentation
You may declare that a documentation is for internal use by placing the
- \l{internal-command}{\\internal} command after the beginning QDoc comment
+ \\internal command after the beginning QDoc comment
\begincomment. QDoc will prevent the internal documentation from appearing
in the public API.
If you wish to omit certain parts of the documentation, you may use the
- \l{omit-command}{\\omit} and \l{omit-command}{\\endomit} command.
+ \\omit and \\endomit command.
\section1 QML Types with C++ Implementation
This example only demonstrates the documentation for types in QML
- files, but the regular \l{qml-documentation}{QML commands} may be placed
+ files, but the regular QML commands may be placed
inside C++ classes to define the public API of the QML type.
*/
@@ -95,7 +95,7 @@
This is a listing of a list of UI components implemented by QML types. These
files are available for general import and they are based on the
- \l{Qt Quick Examples and Tutorials}{Qt Quick Code Samples}.
+ Qt Quick Code Samples.
This module is part of the \l{componentset}{UIComponents} example.
*/
diff --git a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp
index 643a6db6a..b1acdccf0 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp
+++ b/tests/auto/qdoc/generatedoutput/testdata/testcpp/testcpp.cpp
@@ -167,7 +167,7 @@ void TestDerived::virtualFun()
\fn template <typename T1, typename T2> void TestQDoc::Test::funcTemplate(T1 a, T2 b)
\brief Function template with two parameters, \a a and \a b.
\else
- //! nothing
+ \nothing
\endif
*/