aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/parser/codemodel.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/parser/codemodel.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/parser/codemodel.h')
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.h b/sources/shiboken2/ApiExtractor/parser/codemodel.h
index 9a77c5f43..d0d7b677c 100644
--- a/sources/shiboken2/ApiExtractor/parser/codemodel.h
+++ b/sources/shiboken2/ApiExtractor/parser/codemodel.h
@@ -111,6 +111,8 @@ public:
m_qualifiedName = qualified_name;
}
+ bool isVoid() const;
+
bool isConstant() const
{
return m_constant;