aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/typesystem.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-22 11:32:13 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-12-22 15:32:45 +0100
commit7819758c3e259b59786abdcdb4051ce2024ede3a (patch)
tree8084073c52ee0c5ab7280b9bb54ffe036474141a /sources/shiboken6/ApiExtractor/typesystem.h
parent0e055a163c8b81b74ea90180f910827f507fe10e (diff)
shiboken6: De-virtualize TypeEntry::targetLangApiName()
It is only used for the "target" attribute of PrimitiveTypeEntry, all other overridden methods return some Java-ish name. Make it a settable property and remove the overridden methods. Pick-to: 6.0 Change-Id: I34dd3c7a2cb3ea4f6968dc8c8d1a70aad9fbf5ed Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/typesystem.h')
-rw-r--r--sources/shiboken6/ApiExtractor/typesystem.h29
1 files changed, 8 insertions, 21 deletions
diff --git a/sources/shiboken6/ApiExtractor/typesystem.h b/sources/shiboken6/ApiExtractor/typesystem.h
index a823814f7..93e5e4117 100644
--- a/sources/shiboken6/ApiExtractor/typesystem.h
+++ b/sources/shiboken6/ApiExtractor/typesystem.h
@@ -175,16 +175,14 @@ public:
virtual QString qualifiedCppName() const;
- /**
- * Its type's name in target language API
- * The target language API name represents how this type is
- * referred on low level code for the target language.
- * Examples: for Java this would be a JNI name, for Python
- * it should represent the CPython type name.
- * /return string representing the target language API name
- * for this type entry
- */
- virtual QString targetLangApiName() const;
+ /// Its type's name in target language API.
+ /// The target language API name represents how this type is referred on
+ /// low level code for the target language. Examples: for Java this would
+ /// be a JNI name, for Python it should represent the CPython type name.
+ /// \return string representing the target language API name
+ /// Currently used only for PrimitiveTypeEntry (attribute "target").
+ QString targetLangApiName() const;
+ void setTargetLangApiName(const QString &t);
// The type's name in TargetLang
QString targetLangName() const; // "Foo.Bar"
@@ -349,8 +347,6 @@ public:
void setNestedTypeEntry(TypeEntry *nested);
const TypeEntry *nestedTypeEntry() const;
- QString targetLangApiName() const override;
-
TypeEntry *clone() const override;
protected:
@@ -365,9 +361,6 @@ public:
explicit PrimitiveTypeEntry(const QString &entryName, const QVersionNumber &vr,
const TypeEntry *parent);
- QString targetLangApiName() const override;
- void setTargetLangApiName(const QString &targetLangApiName);
-
QString defaultConstructor() const;
void setDefaultConstructor(const QString& defaultConstructor);
bool hasDefaultConstructor() const;
@@ -412,8 +405,6 @@ public:
QString targetLangQualifier() const;
- QString targetLangApiName() const override;
-
QString qualifier() const;
const EnumValueTypeEntry *nullValue() const;
@@ -459,8 +450,6 @@ public:
explicit FlagsTypeEntry(const QString &entryName, const QVersionNumber &vr,
const TypeEntry *parent);
- QString targetLangApiName() const override;
-
QString originalName() const;
void setOriginalName(const QString &s);
@@ -512,8 +501,6 @@ public:
bool isComplex() const override;
- QString targetLangApiName() const override;
-
TypeFlags typeFlags() const;
void setTypeFlags(TypeFlags flags);