aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/abstractmetabuilder.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-03 12:10:50 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-11 19:01:35 +0000
commitbec70b8845b9d642dc2cd29b8c85e8d06b107ea3 (patch)
treee08bcde1f5868f7849ffb5e8230764676ec89033 /sources/shiboken2/ApiExtractor/abstractmetabuilder.h
parent5b682a6bceec3f43a984a028afe242950a2d82d7 (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.h')
-rw-r--r--sources/shiboken2/ApiExtractor/abstractmetabuilder.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.h b/sources/shiboken2/ApiExtractor/abstractmetabuilder.h
index a0ca71b94..bea2ac4c0 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.h
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.h
@@ -38,7 +38,9 @@ QT_FORWARD_DECLARE_CLASS(QIODevice)
class AbstractMetaBuilderPrivate;
class AbstractMetaClass;
+class AbstractMetaType;
class AbstractMetaEnumValue;
+class TypeInfo;
class AbstractMetaBuilder
{
@@ -83,6 +85,16 @@ public:
*/
void setGlobalHeader(const QString& globalHeader);
+ static AbstractMetaType *translateType(const TypeInfo &_typei,
+ AbstractMetaClass *currentClass = nullptr,
+ bool resolveType = true,
+ QString *errorMessage = nullptr);
+ static AbstractMetaType *translateType(const QString &t,
+ AbstractMetaClass *currentClass = nullptr,
+ bool resolveType = true,
+ QString *errorMessage = nullptr);
+
+
#ifndef QT_NO_DEBUG_STREAM
void formatDebug(QDebug &d) const;
#endif