From 5b682a6bceec3f43a984a028afe242950a2d82d7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 3 Jul 2018 08:57:42 +0200 Subject: shiboken: Add instantiations to TypeInfo When streamlining the typeinfo structs in 7f798dfc9fc6e3e9756f06f0fedc821e16f1320a, the parser was wrongly changed to use TypeInfo::m_arguments for template instantiations. This field is intented for function pointer arguments (which the parser does not support). Add a new TypeInfo::m_instantiations (matching AbstractMetaType::m_instantiations) for templates, support it in the type parser and to the toString() method. This allows to remove the mysterious TypeInfo::instantiationName() method. Task-number: PYSIDE-672 Change-Id: I705b26d65988ebfb837e8323941076b4fb37d120 Reviewed-by: Alexandru Croitor Reviewed-by: Christian Tismer --- sources/shiboken2/ApiExtractor/parser/codemodel.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sources/shiboken2/ApiExtractor/parser/codemodel.h') diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.h b/sources/shiboken2/ApiExtractor/parser/codemodel.h index ac1fe26c1..fbc1f2b7a 100644 --- a/sources/shiboken2/ApiExtractor/parser/codemodel.h +++ b/sources/shiboken2/ApiExtractor/parser/codemodel.h @@ -174,6 +174,11 @@ public: m_arguments.append(arg); } + QVector instantiations() const { return m_instantiations; } + void setInstantiations(const QVector &i) { m_instantiations = i; } + void addInstantiation(const TypeInfo &i) { m_instantiations.append(i); } + void clearInstantiations() { m_instantiations.clear(); } + bool operator==(const TypeInfo &other) const; bool operator!=(const TypeInfo &other) const @@ -185,8 +190,6 @@ public: QString toString() const; - QStringList instantiationName() const; - static TypeInfo combine(const TypeInfo &__lhs, const TypeInfo &__rhs); static TypeInfo resolveType(TypeInfo const &__type, CodeModelItem __scope); @@ -200,6 +203,7 @@ private: QStringList m_qualifiedName; QStringList m_arrayElements; QVector m_arguments; + QVector m_instantiations; union { uint flags; -- cgit v1.2.3