From d53af222939321fb816d44f86588c3eb8c255e10 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 14 Apr 2020 15:30:36 +0200 Subject: 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 --- .../generatedoutput/expected_output/scopedenum/testqdoc-test.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html') diff --git a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html index 3fc1f2bc7..864205274 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/scopedenum/testqdoc-test.html @@ -40,7 +40,7 @@

Public Functions

- +
void inlineFunction()
int someFunction(int v)
int someFunction(int v = 0)
void someFunctionDefaultArg(int i, bool b = false)
virtual void virtualFun()
@@ -85,7 +85,7 @@

An inline function, documented using the \fn QDoc command.

-

int Test::someFunction(int v)

+

int Test::someFunction(int v = 0)

Function that takes a parameter v. Also returns the value of v.

-- cgit v1.2.3