aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/parser/codemodel.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-06 09:41:41 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-06 11:17:26 +0000
commit5dec41a724e9967c27eec0a7a0bc36a0b718d310 (patch)
treeb2a32a96d3b69370ec25447f733d55b48650b21b /sources/shiboken2/ApiExtractor/parser/codemodel.h
parentf16328b8705f39a10216356d3c14f28607f62a72 (diff)
shiboken: Handle enum class forward declarations
Add the enumeration to the scope stack only if it actually has values. This occurs for the first time in Qt 5.12, which introduces a forward declaration of enum class QCborSimpleType at src/corelib/kernel/qmetatype.h:65. Task-number: PYSIDE-487 Change-Id: I5798eb8e47bcd4d21dc554dc5cdd257c7163ca90 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/parser/codemodel.h')
-rw-r--r--sources/shiboken2/ApiExtractor/parser/codemodel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/parser/codemodel.h b/sources/shiboken2/ApiExtractor/parser/codemodel.h
index d93aa10d9..20f513e1e 100644
--- a/sources/shiboken2/ApiExtractor/parser/codemodel.h
+++ b/sources/shiboken2/ApiExtractor/parser/codemodel.h
@@ -646,6 +646,7 @@ public:
CodeModel::AccessPolicy accessPolicy() const;
void setAccessPolicy(CodeModel::AccessPolicy accessPolicy);
+ bool hasValues() const { return !m_enumerators.isEmpty(); }
EnumeratorList enumerators() const;
void addEnumerator(EnumeratorModelItem item);