From 6bb7322e47196186375a3733e9112860817ebb1d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 21 Mar 2018 09:29:58 +0100 Subject: shiboken: Detect class enums by Clang entirely The Clang function clang_EnumDecl_isScoped() tells whether an enum is a class, so, there is no need to specify that in the typesystem. Use that information to pass it up to the metalang classes and revert the parts of 44cb6c51e6c3b43376f284941454dc8c13b81c3f that added it to the type system. Task-number: PYSIDE-487 Change-Id: Ie10885f74168821d0307e91b6f1f7f3f30dd074b Reviewed-by: Christian Tismer Reviewed-by: Alexandru Croitor --- sources/shiboken2/ApiExtractor/typesystem.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sources/shiboken2/ApiExtractor/typesystem.cpp') diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp index 600536aba..0a47b9b17 100644 --- a/sources/shiboken2/ApiExtractor/typesystem.cpp +++ b/sources/shiboken2/ApiExtractor/typesystem.cpp @@ -963,11 +963,6 @@ bool Handler::startElement(const QStringRef &n, const QXmlStreamAttributes &atts m_currentEnum = new EnumTypeEntry(QStringList(names.mid(0, names.size() - 1)).join(colonColon()), names.constLast(), since); - if (!attributes.value(enumIdentifiedByValueAttribute()).isEmpty()) { - m_currentEnum->setEnumKind(EnumTypeEntry::AnonymousEnum); - } else if (convertBoolean(attributes.value(classAttribute()), classAttribute(), false)) { - m_currentEnum->setEnumKind(EnumTypeEntry::EnumClass); - } element->entry = m_currentEnum; m_currentEnum->setCodeGeneration(m_generate); m_currentEnum->setTargetLangPackage(m_defaultPackage); -- cgit v1.2.3