diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-03 12:10:50 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-11 19:01:35 +0000 |
commit | bec70b8845b9d642dc2cd29b8c85e8d06b107ea3 (patch) | |
tree | e08bcde1f5868f7849ffb5e8230764676ec89033 /sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h | |
parent | 5b682a6bceec3f43a984a028afe242950a2d82d7 (diff) |
shiboken: Streamline type parsing
Extract a static AbstractMetaType *AbstractMetaBuilder::translateType()
method from the existing AbstractMetaBuilderPrivate::translateType()
which can be passed the current class.
Internally, add a AbstractMetaBuilderPrivate::translateTypeStatic()
method that takes AbstractMetaBuilderPrivate parameter.
Use that in conjunction with the TypeParse code to remove
the type parsing code in
ShibokenGenerator::buildAbstractMetaTypeFromString().
Task-number: PYSIDE-672
Change-Id: Ia17f0eb542099dcb843a59708110fc9d90fab12f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h index 59e3cfc94..7d4e280bd 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h @@ -123,7 +123,14 @@ public: int argumentIndex); AbstractMetaType *translateType(const AddedFunction::TypeInfo &typeInfo); AbstractMetaType *translateType(const TypeInfo &type, - bool resolveType = true); + bool resolveType = true, + QString *errorMessage = nullptr); + static AbstractMetaType *translateTypeStatic(const TypeInfo &type, + AbstractMetaClass *current, + AbstractMetaBuilderPrivate *d = nullptr, + bool resolveType = true, + QString *errorMessageIn = nullptr); + qint64 findOutValueFromString(const QString &stringValue, bool &ok); AbstractMetaClass *findTemplateClass(const QString& name, const AbstractMetaClass *context, |