diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-11-15 14:27:42 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-12-05 13:13:18 +0100 |
commit | e3d3bf42619a20e1845a865b992a60883193c001 (patch) | |
tree | e7f2f0f74b5dd75e8c5e2944686b95b80e10f312 /sources/shiboken6/ApiExtractor/abstractmetalang.h | |
parent | dc992c359d96c9018c03b6b631e41bd37186a438 (diff) |
shiboken6: Make some AbstractMetaClass query functions free functions
Preparing for the introduction of smart pointers for
AbstractMetaClass.
Change-Id: Ie8cbf6bd8abbae4445c34611dd7193297611d48e
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
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 | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h index 526df69af..c28b39a71 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h @@ -113,10 +113,6 @@ public: bool isImplicitlyCopyConstructible() const; bool canAddDefaultCopyConstructor() const; - /// Return type entry of the base class that declares the parent management - TypeEntryCPtr parentManagementEntry() const; - bool hasParentManagement() const { return !parentManagementEntry().isNull(); } - void addSynthesizedComparisonOperators(); bool generateExceptionHandling() const; @@ -219,14 +215,11 @@ public: bool isInvisibleNamespace() const; bool isInlineNamespace() const; - bool isQObject() const; bool isQtNamespace() const; QString qualifiedCppName() const; bool hasSignals() const; - bool inheritsFrom(const AbstractMetaClass *other) const; - bool inheritsFrom(const QString &name) const; /** * Says if the class that declares or inherits a virtual function. @@ -376,6 +369,18 @@ void AbstractMetaClass::invisibleNamespaceRecursion(Function f) const } } +bool inheritsFrom(const AbstractMetaClass *c, const AbstractMetaClass *other); +bool inheritsFrom(const AbstractMetaClass *c, const QString &name); + +inline bool isQObject(const AbstractMetaClass *c) { return inheritsFrom(c, u"QObject"_qs); } + +const AbstractMetaClass *findBaseClass(const AbstractMetaClass *c, + const QString &qualifiedName); +/// Return type entry of the base class that declares the parent management +TypeEntryCPtr parentManagementEntry(const AbstractMetaClass *klass); +inline bool hasParentManagement(const AbstractMetaClass *c) +{ return !parentManagementEntry(c).isNull(); } + Q_DECLARE_OPERATORS_FOR_FLAGS(AbstractMetaClass::CppWrapper); Q_DECLARE_OPERATORS_FOR_FLAGS(AbstractMetaClass::Attributes); |