diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-10 08:33:01 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-10 10:03:21 +0000 |
| commit | 1ef022dc40a859390182a2bfaac311ee1843d9a2 (patch) | |
| tree | ad52ddd71ea4ad3fcb81b68dff21476457aa7742 /sources/shiboken6/ApiExtractor/doxygenparser.cpp | |
| parent | 3464f53cb98cbd70a4e46a5c2f4c59a0c8cb16a0 (diff) | |
shiboken6: Port AbstractMetaField to use QSharedDataPointer
Fold AbstractMetaVariable into AbstractMetaField and use a
QSharedDataPointer for it. Change the client code to store it by value.
For the find() and traverseField() functions, use a std::optional to
replace the pointer.
Change-Id: Ibaa301b9aaae8851fcaa077327235cc5aaad7342
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/doxygenparser.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/doxygenparser.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sources/shiboken6/ApiExtractor/doxygenparser.cpp b/sources/shiboken6/ApiExtractor/doxygenparser.cpp index b835b7c55..435447133 100644 --- a/sources/shiboken6/ApiExtractor/doxygenparser.cpp +++ b/sources/shiboken6/ApiExtractor/doxygenparser.cpp @@ -181,15 +181,14 @@ void DoxygenParser::fillDocumentation(AbstractMetaClass* metaClass) } //Fields - const AbstractMetaFieldList &fields = metaClass->fields(); - for (AbstractMetaField *field : fields) { - if (field->isPrivate()) + for (AbstractMetaField &field : metaClass->fields()) { + if (field.isPrivate()) return; Documentation fieldDoc; for (const auto &tag : docTags) { QString query = QLatin1String("/doxygen/compounddef/sectiondef/memberdef/name[text()=\"") - + field->name() + QLatin1String("\"]/../") + tag.second; + + field.name() + QLatin1String("\"]/../") + tag.second; QString doc = getDocumentation(xquery, query, DocModificationList()); if (doc.isEmpty()) { qCWarning(lcShibokenDoc, "%s", @@ -199,7 +198,7 @@ void DoxygenParser::fillDocumentation(AbstractMetaClass* metaClass) fieldDoc.setValue(doc, tag.first); } } - field->setDocumentation(fieldDoc); + field.setDocumentation(fieldDoc); } //Enums |
