diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/classdocumentation.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/classdocumentation.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sources/shiboken6/ApiExtractor/classdocumentation.h b/sources/shiboken6/ApiExtractor/classdocumentation.h index 9c1acbbae..d47101389 100644 --- a/sources/shiboken6/ApiExtractor/classdocumentation.h +++ b/sources/shiboken6/ApiExtractor/classdocumentation.h @@ -6,6 +6,8 @@ #include <QtCore/QStringList> +#include <optional> + QT_FORWARD_DECLARE_CLASS(QDebug) /// An enumeration in a WebXML/doxygen document @@ -19,6 +21,7 @@ struct EnumDocumentation struct PropertyDocumentation { QString name; + QString brief; QString description; }; @@ -40,9 +43,14 @@ struct FunctionDocumentation : public FunctionDocumentationQuery using FunctionDocumentationList = QList<FunctionDocumentation>; -/// A class/namespace in a WebXML/doxygen document +/// A WebXML/doxygen document struct ClassDocumentation { + enum Type { + Class, // <class>, class/namespace + Header // <header>, grouped global functions/enums + }; + qsizetype indexOfEnum(const QString &name) const; FunctionDocumentationList findFunctionCandidates(const QString &name, bool constant) const; @@ -50,18 +58,17 @@ struct ClassDocumentation const FunctionDocumentationQuery &q); qsizetype indexOfProperty(const QString &name) const; + Type type = Type::Class; QString name; QString description; QList<EnumDocumentation> enums; QList<PropertyDocumentation> properties; FunctionDocumentationList functions; - - operator bool() const { return !name.isEmpty(); } }; /// Parse a WebXML class/namespace document -ClassDocumentation parseWebXml(const QString &fileName, QString *errorMessage); +std::optional<ClassDocumentation> parseWebXml(const QString &fileName, QString *errorMessage); /// Extract the module description from a WebXML module document QString webXmlModuleDescription(const QString &fileName, QString *errorMessage); |