diff options
author | Friedemann Kleint <[email protected]> | 2018-07-05 12:54:25 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2018-07-11 19:01:58 +0000 |
commit | 612bfd01e1e7698cb3a06d619cc7d7c7acd3d273 (patch) | |
tree | dd9aa2aacd81e9045ba6708a4117e503cf3f9bca /sources/shiboken2/ApiExtractor/parser/codemodel.h | |
parent | f2443b02fce5dd4182e80ed0e5343586cbd72a31 (diff) |
shiboken: Move detection of template arguments to ClangBuilder
Obtain the template arguments from Clang and fall back to parsing
the type name where this is not possible (which may be the case
inside a template declaration).
The string-based formatting and re-parsing of the type in
AbstractMetaBuilder::translateType() can then be removed, opening
the way to passing up more complex types from Clang into the
MetaBuilder.
Task-number: PYSIDE-672
Change-Id: I43ff285c5f3720319bf40c65b1c27302ef1b934e
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Christian Tismer <[email protected]>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/parser/codemodel.h')
-rw-r--r-- | sources/shiboken2/ApiExtractor/parser/codemodel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.h b/sources/shiboken2/ApiExtractor/parser/codemodel.h index d0381c4e3..c61f640e1 100644 --- a/sources/shiboken2/ApiExtractor/parser/codemodel.h +++ b/sources/shiboken2/ApiExtractor/parser/codemodel.h @@ -36,6 +36,7 @@ #include "enumvalue.h" #include <QtCore/QHash> +#include <QtCore/QPair> #include <QtCore/QSet> #include <QtCore/QString> #include <QtCore/QStringList> @@ -185,6 +186,8 @@ public: void addInstantiation(const TypeInfo &i) { m_instantiations.append(i); } void clearInstantiations() { m_instantiations.clear(); } + QPair<int, int> parseTemplateArgumentList(const QString &l, int from = 0); + bool operator==(const TypeInfo &other) const; bool operator!=(const TypeInfo &other) const @@ -210,6 +213,8 @@ public: static bool stripLeadingQualifier(const QString &qualifier, QString *s); private: + friend class TypeInfoTemplateArgumentHandler; + static TypeInfo resolveType(CodeModelItem item, TypeInfo const &__type, CodeModelItem __scope); QStringList m_qualifiedName; |