diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-02 13:10:38 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-03 14:29:22 +0000 |
commit | 711515d089574cdc8be63c65d6b01863aadba141 (patch) | |
tree | 3e9ea0ad7ec2da8c94e6b91862d4e7b2670ce863 /sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h | |
parent | 138815277a415595c669793383c2a4fc8c44d132 (diff) |
shiboken: Refactor code involved in inheriting template classes
- Add a helper template to conveniently search for a MetaClass by name
and convenience function to search in lists.
- Remove parameter bool *ok from
AbstractMetaBuilderPrivate::inheritTemplateType() and check on returned
pointer instead.
- In the inheritTemplate*() functions, use QScopedPointer to ensure
the result is deleted on failure.
- Search for a shadowing function first before creating the copy
in inheritTemplate().
Task-number: PYSIDE-725
Change-Id: I3183087fb42b22a2189c17b94eaafdb4c1151f0e
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h index 7f4d222a3..9fcad26ad 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h @@ -142,9 +142,8 @@ public: bool inheritTemplate(AbstractMetaClass *subclass, const AbstractMetaClass *templateClass, const TypeInfo &info); - AbstractMetaType *inheritTemplateType(const QVector<AbstractMetaType *> &templateTypes, - const AbstractMetaType *metaType, - bool *ok = Q_NULLPTR); + AbstractMetaType *inheritTemplateType(const AbstractMetaTypeList &templateTypes, + const AbstractMetaType *metaType); bool isQObject(const FileModelItem &dom, const QString &qualifiedName); bool isEnum(const FileModelItem &dom, const QStringList &qualifiedName); |