diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-12-12 08:26:18 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-12-19 12:29:45 +0100 |
| commit | 1e2f45da078e36487c3bb9bd0d63f67a29ef3f3d (patch) | |
| tree | bfdda4ce8c392f6c68f38ef7fdb147ac65be1053 /sources/shiboken6/ApiExtractor/qtdocparser.cpp | |
| parent | ad5eb64daaaa1b927bcbf9e568738f417fef845f (diff) | |
Documentation: Adapt struct ClassDocumentation for header documents
Global functions and enumeration appear as WebXml documents with a
<header> element instead of class <class>. Extend the
ClassDocumentation and its parse to represent that. Change the parsing
to return an optional and remove the operator bool.
Task-number: PYSIDE-1106
Change-Id: I2e0413904dd8a5859aa9ed2aea9522aa5f24e939
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/qtdocparser.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/qtdocparser.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/qtdocparser.cpp b/sources/shiboken6/ApiExtractor/qtdocparser.cpp index 5aa6ebdca..93fcb440d 100644 --- a/sources/shiboken6/ApiExtractor/qtdocparser.cpp +++ b/sources/shiboken6/ApiExtractor/qtdocparser.cpp @@ -231,12 +231,13 @@ void QtDocParser::fillDocumentation(const AbstractMetaClassPtr &metaClass) const QString sourceFileName = sourceFile.absoluteFilePath(); QString errorMessage; - const ClassDocumentation classDocumentation = parseWebXml(sourceFileName, &errorMessage); - if (!classDocumentation) { + const auto classDocumentationO = parseWebXml(sourceFileName, &errorMessage); + if (!classDocumentationO.has_value()) { qCWarning(lcShibokenDoc, "%s", qPrintable(errorMessage)); return; } + const auto &classDocumentation = classDocumentationO.value(); for (const auto &p : classDocumentation.properties) { Documentation doc(p.description, p.brief); metaClass->setPropertyDocumentation(p.name, doc); |
