From a80ae396c4e497a64c3fed57a9c4628436ad40a4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 12 Jul 2018 15:19:47 +0200 Subject: shiboken: Make targetLangPackage() a normal property of TypeEntry Normally, only the root typesystem element has a package specification; there is no need to have virtual functions for it. Task-number: PYSIDE-725 Task-number: PYSIDE-743 Change-Id: I3b86c8418cf16ce372c1953279a115e2eff0e984 Reviewed-by: Christian Tismer --- sources/shiboken2/ApiExtractor/typesystem.h | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'sources/shiboken2/ApiExtractor/typesystem.h') diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h index 2924d5913..e344e07b4 100644 --- a/sources/shiboken2/ApiExtractor/typesystem.h +++ b/sources/shiboken2/ApiExtractor/typesystem.h @@ -747,10 +747,8 @@ public: } // The package - virtual QString targetLangPackage() const - { - return QString(); - } + QString targetLangPackage() const { return m_targetLangPackage; } + void setTargetLangPackage(const QString &p) { m_targetLangPackage = p; } virtual QString qualifiedTargetLangName() const { @@ -891,6 +889,7 @@ public: CustomConversion* customConversion() const; private: QString m_name; + QString m_targetLangPackage; Type m_type; uint m_codeGeneration = GenerateAll; CustomFunction m_customConstructor; @@ -1031,8 +1030,6 @@ public: m_preferredTargetLangType = b; } - void setTargetLangPackage(const QString& package); - QString targetLangPackage() const override; private: QString m_targetLangName; QString m_targetLangApiName; @@ -1048,9 +1045,6 @@ public: explicit EnumTypeEntry(const QString &nspace, const QString &enumName, const QVersionNumber &vr); - QString targetLangPackage() const override; - void setTargetLangPackage(const QString &package); - QString targetLangName() const override; QString targetLangQualifier() const; QString qualifiedTargetLangName() const override; @@ -1203,8 +1197,6 @@ public: m_enum = e; } - QString targetLangPackage() const override; - private: QString m_originalName; QString m_targetLangName; @@ -1288,12 +1280,6 @@ public: return m_fieldMods; } - QString targetLangPackage() const override; - void setTargetLangPackage(const QString &package) - { - m_package = package; - } - bool isQObject() const { return m_qobject; @@ -1405,7 +1391,6 @@ private: AddedFunctionList m_addedFunctions; FunctionModificationList m_functionMods; FieldModificationList m_fieldMods; - QString m_package; QString m_defaultSuperclass; QString m_qualifiedCppName; QString m_targetLangName; @@ -1455,7 +1440,6 @@ public: QString typeName() const; QString targetLangName() const override; - QString targetLangPackage() const override; QString qualifiedCppName() const override; static Type containerTypeFromString(QString typeName) -- cgit v1.2.3