diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-04-14 15:30:36 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2020-04-21 06:04:31 +0000 |
commit | d53af222939321fb816d44f86588c3eb8c255e10 (patch) | |
tree | c56b5853d743a516a1cb540ba5e8f3218c1eec56 /tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-test.webxml | |
parent | 8f379adf059977c04c2105b6ca73b04b1a923d8a (diff) |
qdoc: Fix handling of default values for function parameters
When using an \fn command to document a function that has default
values for parameter(s), The Clang parser retrieves a relevant
section of the source file that contains the expression for the
default value. In case of \fn, the source is a temporary translation
unit that was constructed on the fly - but it may not exist anymore,
and the default value is lost.
Fix this by storing the contents of the temporary TU for later access.
Fixes: QTBUG-83472
Change-Id: I20ad9e3322636450db1def65933837c1c767f2c4
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-test.webxml')
-rw-r--r-- | tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-test.webxml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-test.webxml b/tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-test.webxml index d2726cc57..7ae77ec5a 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-test.webxml +++ b/tests/auto/qdoc/generatedoutput/expected_output/html/testqdoc-test.webxml @@ -39,7 +39,7 @@ <description/> </function> <function name="someFunction" fullname="TestQDoc::Test::someFunction" href="testqdoc-test.html#someFunction" status="active" access="public" location="testcpp.h" documented="true" meta="plain" virtual="non" const="false" static="false" final="false" override="false" type="int" signature="int someFunction(int v)"> - <parameter type="int" name="v" default=""/> + <parameter type="int" name="v" default="0"/> <description> <para>Function that takes a parameter <argument>v</argument>. Also returns the value of <argument>v</argument>.</para> </description> |