aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.cpp11
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetalang.h4
-rw-r--r--sources/shiboken2/ApiExtractor/docparser.cpp1
3 files changed, 11 insertions, 5 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();
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.h b/sources/shiboken2/ApiExtractor/abstractmetalang.h
index cfc8b7246..d1a0fbf88 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetalang.h
+++ b/sources/shiboken2/ApiExtractor/abstractmetalang.h
@@ -137,7 +137,9 @@ public:
FinalCppClass = 0x00100000,
VirtualCppMethod = 0x00200000,
OverriddenCppMethod = 0x00400000,
- FinalCppMethod = 0x00800000
+ FinalCppMethod = 0x00800000,
+ // Add by meta builder (implicit constructors, inherited methods, etc)
+ AddedMethod = 0x01000000
};
Q_DECLARE_FLAGS(Attributes, Attribute)
Q_FLAG(Attribute)
diff --git a/sources/shiboken2/ApiExtractor/docparser.cpp b/sources/shiboken2/ApiExtractor/docparser.cpp
index 0cbae33eb..d59411fe6 100644
--- a/sources/shiboken2/ApiExtractor/docparser.cpp
+++ b/sources/shiboken2/ApiExtractor/docparser.cpp
@@ -82,6 +82,7 @@ bool DocParser::skipForQuery(const AbstractMetaFunction *func)
{
// Skip private functions and copies created by AbstractMetaClass::fixFunctions()
if (!func || func->isPrivate()
+ || (func->attributes() & AbstractMetaAttributes::AddedMethod) != 0
|| func->isModifiedRemoved()
|| func->declaringClass() != func->ownerClass()
|| func->isCastOperator()) {