diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-07-21 11:28:33 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-07-21 19:30:47 +0200 |
commit | 8d3ed516a063b365459ce62b8b1b62ed2ad373cb (patch) | |
tree | 1f7c6fc3191c5bf35a1613ca90b28525216667d7 /sources/shiboken6/ApiExtractor/abstractmetalang.h | |
parent | 795e5b7c7521d275750590be728ed1078150f537 (diff) |
shiboken6: Refactor AbstractMetaClass:inheritsFrom()
Reimplement AbstractMetaClass::inheritsFrom() to go through the list
of base classes and the template base class. Add an overload taking a
name and use that in some cases.
Change-Id: I736fd64bba3365ee9f2ee586844166ed64002706
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h index 6f1971df9..39d5a4a8e 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h @@ -236,14 +236,14 @@ public: bool isNamespace() const; bool isInvisibleNamespace() const; - bool isQObject() const; - + bool isQObject() const { return inheritsFrom(u"QObject"_qs); } 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. |