aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/generator/qtdoc/qtdocgenerator.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-22 13:30:16 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-11-25 14:47:58 +0100
commit2092ef75e026eb18358495486558fe41cb388d6a (patch)
tree1aa9b97ae8782b15e95372bf41406a44c02f082c /sources/shiboken6/generator/qtdoc/qtdocgenerator.h
parentfc4b682a4012ffb173430943efd631adc426cf3f (diff)
shiboken6: Generate property documentation
Previously, the documentation generator used to insert the property documentation at the getter/setter function documentation. The properties for use with true_property are hard to discover in this scheme. To fix this, add a separate TOC section and description list for the properties using the sphinx :py:property: directive and link to it from the functions and signals instead. This mimicks the C++ documentation. Task-number: PYSIDE-1106 Task-number: PYSIDE-1019 Change-Id: I976fee91a02ca4c8a7c62c7d957ecaea59ac4ebc Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit c6000ddef0d50c3c6068c92b8066a1b73be9ad45) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/generator/qtdoc/qtdocgenerator.h')
-rw-r--r--sources/shiboken6/generator/qtdoc/qtdocgenerator.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/shiboken6/generator/qtdoc/qtdocgenerator.h b/sources/shiboken6/generator/qtdoc/qtdocgenerator.h
index 595477ee7..225b78f95 100644
--- a/sources/shiboken6/generator/qtdoc/qtdocgenerator.h
+++ b/sources/shiboken6/generator/qtdoc/qtdocgenerator.h
@@ -68,6 +68,12 @@ private:
static void writeFunctionToc(TextStream &s, const QString &title,
const AbstractMetaClass *cppClass,
const AbstractMetaFunctionCList &functions);
+ void writePropertyToc(TextStream &s,
+ const GeneratorDocumentation &doc,
+ const AbstractMetaClass *cppClass);
+ void writeProperties(TextStream &s,
+ const GeneratorDocumentation &doc,
+ const AbstractMetaClass *cppClass) const;
void writeParameterType(TextStream &s, const AbstractMetaClass *cppClass,
const AbstractMetaArgument &arg) const;
@@ -93,7 +99,8 @@ private:
void writeAdditionalDocumentation() const;
bool writeInheritanceFile();
- QString translateToPythonType(const AbstractMetaType &type, const AbstractMetaClass *cppClass) const;
+ QString translateToPythonType(const AbstractMetaType &type, const AbstractMetaClass *cppClass,
+ bool createRef = true) const;
bool convertToRst(const QString &sourceFileName,
const QString &targetFileName,