diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-09-27 08:06:02 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-09-27 23:12:11 +0200 |
| commit | df67bfbc7289c526d54105248e064d8846ad9ad5 (patch) | |
| tree | a60341dc9009444405704150d453c4f2d9f5af92 /sources/shiboken6/ApiExtractor/doxygenparser.cpp | |
| parent | ff283650bd482c2132ce3bac647e109447850cff (diff) | |
shiboken6/Documentation: Add source file to the Documentation class
This is useful for resolving images. Use it for the module
documentation.
Task-number: QTBUG-77650
Task-number: PYSIDE-2620
Task-number: PYSIDE-1106
Change-Id: Ib7843541af75aa179ac7d862fc30351f69f550ed
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/doxygenparser.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/doxygenparser.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/doxygenparser.cpp b/sources/shiboken6/ApiExtractor/doxygenparser.cpp index c8cae38a5..62fa119b0 100644 --- a/sources/shiboken6/ApiExtractor/doxygenparser.cpp +++ b/sources/shiboken6/ApiExtractor/doxygenparser.cpp @@ -86,6 +86,7 @@ QString DoxygenParser::fillDocumentation(const AbstractMetaClassPtr &metaClass) }; // Get class documentation Documentation classDoc; + classDoc.setSourceFile(doxyFilePath); for (const auto &tag : docTags) { const QString classQuery = u"/doxygen/compounddef/"_s + tag.second; @@ -140,6 +141,7 @@ QString DoxygenParser::fillDocumentation(const AbstractMetaClassPtr &metaClass) } } Documentation funcDoc; + funcDoc.setSourceFile(doxyFilePath); for (const auto &tag : docTags) { QString funcQuery(query); if (!isProperty) { @@ -169,6 +171,7 @@ QString DoxygenParser::fillDocumentation(const AbstractMetaClassPtr &metaClass) continue; Documentation fieldDoc; + fieldDoc.setSourceFile(doxyFilePath); for (const auto &tag : docTags) { QString query = u"/doxygen/compounddef/sectiondef/memberdef/name[text()=\""_s + field.name() + u"\"]/../"_s + tag.second; @@ -193,7 +196,7 @@ QString DoxygenParser::fillDocumentation(const AbstractMetaClassPtr &metaClass) qCWarning(lcShibokenDoc, "%s", qPrintable(msgCannotFindDocumentation(doxyFilePath, metaClass, meta_enum, query))); } - meta_enum.setDocumentation(Documentation(doc, {})); + meta_enum.setDocumentation(Documentation(doc, {}, doxyFilePath)); } return doxyFilePath; @@ -220,6 +223,6 @@ Documentation DoxygenParser::retrieveModuleDocumentation(const QString& name){ // Module documentation QString query = u"/doxygen/compounddef/detaileddescription"_s; const QString doc = getDocumentation(xquery, query, DocModificationList()); - return Documentation(doc, {}); + return Documentation(doc, {}, sourceFile); } |
