diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-05-17 16:20:26 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-05-18 13:10:01 +0000 |
commit | a977d18c83be3899f6db88840677dfa08d12f27d (patch) | |
tree | 5503a2ee5294250f551a71b8e367c18e6de4526d /sources/shiboken2/ApiExtractor/abstractmetalang.cpp | |
parent | a6f4489282b10253ef2d15d163ecbddd7c193ff2 (diff) |
Documentation: Skip methods added by the meta builder
Introduce an attribute for added methods and exclude them
from the documentation generation.
Task-number: PYSIDE-363
Change-Id: I06d3f468bcec4d0480012d29e26dabadae51634b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetalang.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetalang.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp index 7cba99839..5be7050bf 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp @@ -1756,7 +1756,7 @@ void AbstractMetaClass::addDefaultConstructor() f->setArguments(AbstractMetaArgumentList()); f->setDeclaringClass(this); - f->setAttributes(AbstractMetaAttributes::Public | AbstractMetaAttributes::FinalInTargetLang); + f->setAttributes(Public | FinalInTargetLang | AddedMethod); f->setImplementingClass(this); f->setOriginalAttributes(f->attributes()); @@ -1784,7 +1784,7 @@ void AbstractMetaClass::addDefaultCopyConstructor(bool isPrivate) arg->setName(name()); f->addArgument(arg); - AbstractMetaAttributes::Attributes attr = AbstractMetaAttributes::FinalInTargetLang; + AbstractMetaAttributes::Attributes attr = FinalInTargetLang | AddedMethod; if (isPrivate) attr |= AbstractMetaAttributes::Private; else @@ -2156,8 +2156,11 @@ void AbstractMetaClass::fixFunctions() funcsToAdd << sf; } - for (AbstractMetaFunction *f : qAsConst(funcsToAdd)) - funcs << f->copy(); + for (AbstractMetaFunction *f : qAsConst(funcsToAdd)) { + AbstractMetaFunction *copy = f->copy(); + (*copy) += AddedMethod; + funcs.append(copy); + } if (superClass) superClass = superClass->baseClass(); |