diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-02-28 10:13:15 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-02-28 13:59:43 +0000 |
commit | 7c83f2ebc1ac55c6e2556c8c852716502dcdba5a (patch) | |
tree | 34c9b4a962474b1c3f810628750e653739de97ad /sources/shiboken2/ApiExtractor | |
parent | 35124c91148e42708265662eb100e5ecdc24282c (diff) |
shiboken: Remove unused code related to enumerations
Remove class struct EnumValueRedirection and add explanatory
comment to EnumValueTypeEntry.
Change-Id: Ic4665436f301943805c7985188bc41c4ad3e8336
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor')
-rw-r--r-- | sources/shiboken2/ApiExtractor/typesystem.cpp | 13 | ||||
-rw-r--r-- | sources/shiboken2/ApiExtractor/typesystem.h | 18 |
2 files changed, 2 insertions, 29 deletions
diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp index 38a2a60bf..749ce2f71 100644 --- a/sources/shiboken2/ApiExtractor/typesystem.cpp +++ b/sources/shiboken2/ApiExtractor/typesystem.cpp @@ -2279,19 +2279,6 @@ QString FlagsTypeEntry::targetLangPackage() const return m_enum->targetLangPackage(); } -void EnumTypeEntry::addEnumValueRedirection(const QString &rejected, const QString &usedValue) -{ - m_enumRedirections << EnumValueRedirection(rejected, usedValue); -} - -QString EnumTypeEntry::enumValueRedirection(const QString &value) const -{ - for (int i = 0; i < m_enumRedirections.size(); ++i) - if (m_enumRedirections.at(i).rejected == value) - return m_enumRedirections.at(i).used; - return QString(); -} - QString FlagsTypeEntry::qualifiedTargetLangName() const { return targetLangPackage() + QLatin1Char('.') + m_enum->targetLangQualifier() diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h index c8a1c88fa..f2b5a9320 100644 --- a/sources/shiboken2/ApiExtractor/typesystem.h +++ b/sources/shiboken2/ApiExtractor/typesystem.h @@ -1042,18 +1042,6 @@ private: PrimitiveTypeEntry* m_referencedTypeEntry = nullptr; }; -struct EnumValueRedirection -{ - EnumValueRedirection() {} - EnumValueRedirection(const QString &rej, const QString &us) - : rejected(rej), - used(us) - { - } - QString rejected; - QString used; -}; - class EnumTypeEntry : public TypeEntry { public: @@ -1133,9 +1121,6 @@ public: return m_rejectedEnums; } - void addEnumValueRedirection(const QString &rejected, const QString &usedValue); - QString enumValueRedirection(const QString &value) const; - bool forceInteger() const { return m_forceInteger; @@ -1163,7 +1148,6 @@ private: QString m_upperBound; QStringList m_rejectedEnums; - QVector<EnumValueRedirection> m_enumRedirections; FlagsTypeEntry *m_flags = nullptr; @@ -1172,6 +1156,8 @@ private: bool m_anonymous = false; }; +// EnumValueTypeEntry is used for resolving integer type templates +// like array<EnumValue>. class EnumValueTypeEntry : public TypeEntry { public: |