summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2022-11-16 09:33:15 +0100
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2023-01-24 12:59:23 +0100
commitc1d40191c672dcf68d658b434085d3288bda97eb (patch)
tree4240849048e7cb9ae567a4d6be6fdd021905fe03 /tests
parent4310d99bee0577b4677ed4dc34c192d36fa1df3b (diff)
downloadqttools-c1d40191c672dcf68d658b434085d3288bda97eb.tar.gz
qdoc: Ignore rest of the line for \inlineimage
Inline images need not consider rest of the line as alt text, unless they are wrapped in a {}. Updated the qdoc manual to indicate that caption to an inline image must be wrapped in braces. Pick-to: 6.2 6.4 6.5 Done-with: Topi Reinio <topi.reinio@qt.io> Change-Id: I2098e8da2e9139bc6c022f36aa8432913546e863 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml13
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html4
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/images/01.pngbin0 -> 1142 bytes
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc12
6 files changed, 37 insertions, 0 deletions
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
index 3e3c440ac..8c2e3d93d 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
@@ -103,6 +103,19 @@
</db:imageobject>
</db:mediaobject>
</db:figure>
+<db:para>An inline image:</db:para>
+<db:para>The is a paragraph containing an <db:inlinemediaobject>
+<db:imageobject>
+<db:imagedata fileref="images/01.png"/>
+</db:imageobject>
+</db:inlinemediaobject> inline image to test if qdoc handles them properly, without considering rest of the line as alt text for the image.</db:para>
+<db:para>An inline image with alt text:</db:para>
+<db:para>Here is another example of <db:inlinemediaobject>
+<db:alt>No. 1</db:alt>
+<db:imageobject>
+<db:imagedata fileref="images/01.png"/>
+</db:imageobject>
+</db:inlinemediaobject> inline image with alternative text, which should be added as an attribute to the inline image.</db:para>
</db:section>
<db:section xml:id="commands-not-yet-tested">
<db:title>Commands not yet tested</db:title>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml b/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml
index f739796ff..561d139cf 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml
@@ -74,6 +74,10 @@
<para>A bordered image with a caption:</para>
<image href="images/leonardo-da-vinci.png"/>
<para>Screenshot of the System Tray Icon</para>
+ <para>An inline image:</para>
+ <para>The is a paragraph containing an <inlineimage href="images/01.png"/> inline image to test if qdoc handles them properly, without considering rest of the line as alt text for the image.</para>
+ <para>An inline image with alt text:</para>
+ <para>Here is another example of <inlineimage href="images/01.png"/> inline image with alternative text, which should be added as an attribute to the inline image.</para>
</section>
<section id="commands-not-yet-tested">
<heading level="1">Commands not yet tested</heading>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html b/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html
index 1d1f4d82a..69c729848 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html
@@ -60,6 +60,10 @@
<p>A bordered image:</p>
<div class="border"><p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p></div><p>A bordered image with a caption:</p>
<div class="border"><p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p></div><p class="figCaption">Screenshot of the System Tray Icon</p>
+<p>An inline image:</p>
+<p>The is a paragraph containing an <img src="images/01.png" alt="" /> inline image to test if qdoc handles them properly, without considering rest of the line as alt text for the image.</p>
+<p>An inline image with alt text:</p>
+<p>Here is another example of <img src="images/01.png" alt="No. 1" /> inline image with alternative text, which should be added as an attribute to the inline image.</p>
<h2 id="commands-not-yet-tested">Commands not yet tested</h2>
<div class="admonition warning">
<p><b>Warning: </b>The following commands have yet to be tested: footnote link sincelist header index topicref // or just don’t care, remove it inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</p>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html b/tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html
index 3d0f323c8..3b140db49 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html
@@ -69,6 +69,10 @@
<p>A bordered image:</p>
<div class="border"><p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p></div><p>A bordered image with a caption:</p>
<div class="border"><p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p></div><p class="figCaption">Screenshot of the System Tray Icon</p>
+<p>An inline image:</p>
+<p>The is a paragraph containing an <img src="images/01.png" alt="" /> inline image to test if qdoc handles them properly, without considering rest of the line as alt text for the image.</p>
+<p>An inline image with alt text:</p>
+<p>Here is another example of <img src="images/01.png" alt="No. 1" /> inline image with alternative text, which should be added as an attribute to the inline image.</p>
<h2 id="commands-not-yet-tested">Commands not yet tested</h2>
<div class="admonition warning">
<p><b>Warning: </b>The following commands have yet to be tested: footnote link sincelist header index topicref // or just don’t care, remove it inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</p>
diff --git a/tests/auto/qdoc/generatedoutput/testdata/images/01.png b/tests/auto/qdoc/generatedoutput/testdata/images/01.png
new file mode 100644
index 000000000..d73ab969b
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/testdata/images/01.png
Binary files differ
diff --git a/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc b/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
index c4fbc7b76..99f23b722 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
@@ -183,6 +183,18 @@
\borderedimage leonardo-da-vinci.png
\caption Screenshot of the System Tray Icon
+ An inline image:
+
+ The is a paragraph containing an \inlineimage 01.png inline image to test
+ if qdoc handles them properly, without considering rest of the line as
+ alt text for the image.
+
+ An inline image with alt text:
+
+ Here is another example of \inlineimage 01.png {No. 1} inline image with
+ alternative text, which should be added as an attribute to the inline
+ image.
+
\section1 Commands not yet tested
\warning The following commands have yet to be tested: