From 2bfd1de3495b18c0ecc251260442a9a46009861e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 20 Jul 2018 14:52:21 +0200 Subject: shiboken: Add a typedef typesystem entry The intention is be able to specify typedef std::optional OptionalInt in the typesystem file and generate code for it (without having a typedef in C++). Task-number: PYSIDE-725 Change-Id: I5847a3c3f68556ac1d0ea3635f65a29caa6cb208 Reviewed-by: Christian Tismer --- sources/shiboken2/ApiExtractor/typedatabase.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sources/shiboken2/ApiExtractor/typedatabase.h') diff --git a/sources/shiboken2/ApiExtractor/typedatabase.h b/sources/shiboken2/ApiExtractor/typedatabase.h index b37efedc8..42d41be46 100644 --- a/sources/shiboken2/ApiExtractor/typedatabase.h +++ b/sources/shiboken2/ApiExtractor/typedatabase.h @@ -95,6 +95,7 @@ public: TypeEntry* findType(const QString& name) const; const TypeEntryMultiMap &entries() const { return m_entries; } + const TypedefEntryMap &typedefEntries() const { return m_typedefEntries; } PrimitiveTypeEntryList primitiveTypes() const; @@ -113,7 +114,7 @@ public: bool isReturnTypeRejected(const QString& className, const QString& typeName, QString *reason = nullptr) const; - void addType(TypeEntry* e); + bool addType(TypeEntry* e, QString *errorMessage = nullptr); FlagsTypeEntry* findFlagsType(const QString& name) const; void addFlagsType(FlagsTypeEntry* fte); @@ -162,10 +163,12 @@ public: #endif private: TypeEntryMultiMapConstIteratorRange findTypes(const QString &name) const; + TypeEntry *resolveTypeDefEntry(TypedefEntry *typedefEntry, QString *errorMessage); bool m_suppressWarnings; TypeEntryMultiMap m_entries; TypeEntryMap m_flagsEntries; + TypedefEntryMap m_typedefEntries; TemplateEntryMap m_templates; QVector m_suppressedWarnings; -- cgit v1.2.3