aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-05-30 08:26:47 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-05-30 11:57:29 +0000
commit50dd4ae202d7afb3556335c056db003f5ef50532 (patch)
treef228d0714160bd8e31f068d10ab32b7c744058ec /sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h
parent3be012086ed261ae41547b454189f6806fa9e375 (diff)
shiboken: Streamline the type parsing code
- Remove bool *ok-parameter from AbstractMetaBuilderPrivate::translateType() It was only used to handle the special case of void return values of functions where translateType() returned nullptr/ok = true. Add a check TypeInfo::isVoid for this purpose and move this handling to traverseFunction instead. For all other cases, translateType() returning nullptr means failure. - Remove the code triggered by the bool resolveScope parameter of AbstractMetaBuilderPrivate::translateType(). It has been observed to not find any matches, likely due to the types being fully qualified by Clang. - Remove function AbstractMetaBuilderPrivate::decideUsagePattern() which was a one-liner calling AbstractMetaType::decideUsagePattern() Task-number: PYSIDE-672 Change-Id: I0336896917cb914d4d622eefa0a21e6e319efa0f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> 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.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h
index 7becb2c34..959734462 100644
--- a/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h
+++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder_p.h
@@ -120,14 +120,11 @@ public:
AbstractMetaFunction *fnc, AbstractMetaClass *,
int argumentIndex);
AbstractMetaType *translateType(const AddedFunction::TypeInfo &typeInfo);
- AbstractMetaType *translateType(const TypeInfo &type, bool *ok,
- bool resolveType = true,
- bool resolveScope = true);
+ AbstractMetaType *translateType(const TypeInfo &type,
+ bool resolveType = true);
qint64 findOutValueFromString(const QString &stringValue, bool &ok);
- void decideUsagePattern(AbstractMetaType *type);
-
AbstractMetaClass *findTemplateClass(const QString& name, const AbstractMetaClass *context,
TypeParser::Info *info = Q_NULLPTR,
ComplexTypeEntry **baseContainerType = Q_NULLPTR) const;