diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-02-12 11:39:36 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-03-01 16:28:48 +0100 |
commit | 2107b9c16d7be1292c5439a47ed31871906e0b1f (patch) | |
tree | 64447316e8885d4bcf3a45c6657eb7372c60c67c /sources/shiboken6/ApiExtractor/abstractmetalang.h | |
parent | c6f4d907190dbd66d09db7d4809c06f1b3e48ec2 (diff) |
shiboken6: Add constructors of base classes imported via "using"
Parse "using" declarations in the clang builder using some code
from the base class determination algorithm.
Resolve them to struct UsingMember containing the base class
and the member name in the metabuilder and check whether any
base constructors are imported via "using". Add them
as functions like the default constructor.
Change-Id: I121a70f0591c6d1e6f9daedfb653206c49c07a3f
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h index b599a82cd..eab7969a6 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h @@ -41,12 +41,14 @@ QT_FORWARD_DECLARE_CLASS(QDebug) +enum class Access; class AbstractMetaClassPrivate; class ComplexTypeEntry; class Documentation; class EnumTypeEntry; class QPropertySpec; class SourceLocation; +struct UsingMember; class AbstractMetaClass : public EnclosingClassMixin { @@ -136,6 +138,11 @@ public: CppWrapper cppWrapper() const; + const UsingMembers &usingMembers() const; + void addUsingMember(const UsingMember &um); + bool isUsingMember(const AbstractMetaClass *c, const QString &memberName, + Access minimumAccess) const; + AbstractMetaFunctionCList queryFunctionsByName(const QString &name) const; static bool queryFunction(const AbstractMetaFunction *f, FunctionQueryOptions query); static AbstractMetaFunctionCList queryFunctionList(const AbstractMetaFunctionCList &list, @@ -343,6 +350,8 @@ public: const TypeEntry* typeEntry); static const AbstractMetaClass *findClass(const AbstractMetaClassCList &classes, const TypeEntry* typeEntry); + const AbstractMetaClass *findBaseClass(const QString &qualifiedName) const; + static std::optional<AbstractMetaEnumValue> findEnumValue(const AbstractMetaClassList &classes, const QString &string); static std::optional<AbstractMetaEnum> findEnum(const AbstractMetaClassList &classes, |