aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/parser/codemodel.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-03 08:57:42 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-11 19:01:30 +0000
commit5b682a6bceec3f43a984a028afe242950a2d82d7 (patch)
tree1809c7b55ef7e3e592d56f714f90520e5ba4ba7f /sources/shiboken2/ApiExtractor/parser/codemodel.h
parentd23b43816a7ed6a9513b2213a7e633eed2155769 (diff)
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 <alexandru.croitor@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/parser/codemodel.h')
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel.h8
1 files changed, 6 insertions, 2 deletions
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<TypeInfo> instantiations() const { return m_instantiations; }
+ void setInstantiations(const QVector<TypeInfo> &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<TypeInfo> m_arguments;
+ QVector<TypeInfo> m_instantiations;
union {
uint flags;