diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-03-21 09:29:58 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-04-19 10:36:17 +0000 |
commit | 6bb7322e47196186375a3733e9112860817ebb1d (patch) | |
tree | 72ad9417342894e4ea76062284c5fcb80c7081ec /sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp | |
parent | 06fe31fd68823b53bbd0657e4bd63ef06b35137d (diff) |
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 <tismer@stackless.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp index 1afc7d135..c38a145bd 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.cpp @@ -1055,7 +1055,7 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(EnumModelItem enumIte nspace = QStringList(names.mid(0, names.size() - 1)).join(colonColon()); typeEntry = new EnumTypeEntry(nspace, enumName, QVersionNumber(0, 0)); TypeDatabase::instance()->addType(typeEntry); - } else if (!enumItem->isAnonymous()) { + } else if (enumItem->enumKind() != AnonymousEnum) { typeEntry = TypeDatabase::instance()->findType(qualifiedName); } else { QStringList tmpQualifiedName = enumItem->qualifiedName(); @@ -1096,6 +1096,7 @@ AbstractMetaEnum *AbstractMetaBuilderPrivate::traverseEnum(EnumModelItem enumIte } AbstractMetaEnum *metaEnum = new AbstractMetaEnum; + metaEnum->setEnumKind(enumItem->enumKind()); if (enumsDeclarations.contains(qualifiedName) || enumsDeclarations.contains(enumName)) { metaEnum->setHasQEnumsDeclaration(true); |