aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/headergenerator.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-27 09:17:19 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-30 08:34:56 +0000
commitfee4a7f9fa7177e94ab4853b049fca093e2849fc (patch)
treedce6d5ee3637ece5e046fbfa70c08d3b5c0f6c8e /sources/shiboken2/generator/shiboken2/headergenerator.h
parentcdeb08db44bf527abdc2cb15d9071d6b925d0410 (diff)
shiboken: Generate anonymous int-type enums instead of index macros
#define SBK_QMETAOBJECT_CONNECTION_IDX 158 #define SBK_QTEXTCODEC_CONVERTERSTATE_IDX 246 becomes: enum : int { SBK_QMETAOBJECT_CONNECTION_IDX = 158, SBK_QTEXTCODEC_CONVERTERSTATE_IDX = 246, which is more pleasing to the eye. Rename the helper _writeTypeIndexDefineLine() to _writeTypeIndexValue() for the enum values and split out a function that writes the value only so that some code duplication can be avoided. Change-Id: I0d51afbbe93e515ba1dce1275fa5a01a6bcd95ca Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/headergenerator.h')
-rw-r--r--sources/shiboken2/generator/shiboken2/headergenerator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken2/generator/shiboken2/headergenerator.h b/sources/shiboken2/generator/shiboken2/headergenerator.h
index acf0448a7..821531aab 100644
--- a/sources/shiboken2/generator/shiboken2/headergenerator.h
+++ b/sources/shiboken2/generator/shiboken2/headergenerator.h
@@ -55,8 +55,8 @@ private:
void writeSbkTypeFunction(QTextStream& s, const AbstractMetaEnum* cppEnum);
void writeSbkTypeFunction(QTextStream& s, const AbstractMetaClass* cppClass);
void writeSbkTypeFunction(QTextStream &s, const AbstractMetaType *metaType);
- void writeTypeIndexDefineLine(QTextStream& s, const TypeEntry* typeEntry);
- void writeTypeIndexDefine(QTextStream& s, const AbstractMetaClass* metaClass);
+ void writeTypeIndexValueLine(QTextStream& s, const TypeEntry* typeEntry);
+ void writeTypeIndexValueLines(QTextStream& s, const AbstractMetaClass* metaClass);
void writeProtectedEnumSurrogate(QTextStream& s, const AbstractMetaEnum* cppEnum);
void writeInheritedOverloads(QTextStream& s);