aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/classdocumentation.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-11-21 12:23:16 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2024-11-21 17:47:10 +0100
commitd03c8661e0bf1c2d094155b39eca00674dcd2ff2 (patch)
tree29f7ce1d6f100a549937b46c8debcc6aa86cdfb1 /sources/shiboken6/ApiExtractor/classdocumentation.cpp
parent3dd001116eb8ac061efa21ec65cb13d1bd1991e7 (diff)
Documentation: Use function parameter names from WebXML/qdoc when they are missing
In some cases, the Qt headers do not have parameter names. Use the ones from the WebXML documents in that case. Pick-to: 6.8 Task-numer: PYSIDE-1106 Change-Id: I719a4fb09b9fbef9fc734036e3f53c02376a5d5f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/classdocumentation.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/classdocumentation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/classdocumentation.cpp b/sources/shiboken6/ApiExtractor/classdocumentation.cpp
index 637e4a422..2f92b2e3c 100644
--- a/sources/shiboken6/ApiExtractor/classdocumentation.cpp
+++ b/sources/shiboken6/ApiExtractor/classdocumentation.cpp
@@ -137,8 +137,11 @@ static void parseWebXmlElement(WebXmlCodeTag tag, const QXmlStreamAttributes &at
}
break;
case WebXmlCodeTag::Parameter:
- Q_ASSERT(!cd->functions.isEmpty());
- cd->functions.last().parameters.append(attributes.value(u"type"_s).toString());
+ Q_ASSERT(!cd->functions.isEmpty()); {
+ FunctionDocumentation &last = cd->functions.last();
+ last.parameters.append(attributes.value(u"type"_s).toString());
+ last.parameterNames.append(attributes.value(u"name"_s).toString());
+ }
break;
case WebXmlCodeTag::Property: {
PropertyDocumentation pd;