diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-04-05 11:02:53 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-04-19 10:53:43 +0000 |
commit | a7af6bfb45418a668688e8a10f2c648222cb7a4d (patch) | |
tree | 7de430cf22a4be5094e30a5ee3ae550c3d0c2d81 /sources/shiboken2/generator | |
parent | 3d075800adbd0d3709656cacab10461a9d13db69 (diff) |
shiboken: Exclude smart-pointer-type from documentation
smart-pointer-type is a special type for making getter method
and type known to shiboken. It should not be documented.
Fixes a lot of warnings when trying to generate documentation
for QtQuick.QSharedPointer.
Task-number: PYSIDE-363
Change-Id: Icb26fa3e16cd74ae5115cdd1cbe32cb48ab5445b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/generator')
-rw-r--r-- | sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp | 6 | ||||
-rw-r--r-- | sources/shiboken2/generator/qtdoc/qtdocgenerator.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp index 11e66d0cc..ebb9913cb 100644 --- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp +++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp @@ -1289,6 +1289,12 @@ QString QtDocGenerator::fileNameSuffix() const return QLatin1String(".rst"); } +bool QtDocGenerator::shouldGenerate(const AbstractMetaClass *cls) const +{ + return Generator::shouldGenerate(cls) + && cls->typeEntry()->type() != TypeEntry::SmartPointerType; +} + QString QtDocGenerator::fileNameForContext(GeneratorContext &context) const { const AbstractMetaClass *metaClass = context.metaClass(); diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.h b/sources/shiboken2/generator/qtdoc/qtdocgenerator.h index 9f08a4e8d..c8318b862 100644 --- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.h +++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.h @@ -224,6 +224,8 @@ public: return m_codeSnippetDirs; } + bool shouldGenerate(const AbstractMetaClass *) const override; + protected: QString fileNameSuffix() const override; QString fileNameForContext(GeneratorContext &context) const override; |