aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/typesystem.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-06-10 12:57:27 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-06-11 13:24:39 +0200
commitd2752b4bd15387c906f0d994a49db16225c395e0 (patch)
tree4729558f5f7ed591e7d251943c4e1ceba6d0e6fd /sources/shiboken6/ApiExtractor/typesystem.h
parentd9070999d95ed1aec9768425e70f6d300fa5bef1 (diff)
shiboken6: Add a check-function attribute to custom type entries
shiboken knows some check functions and defaults to typeName + "_Check" in the end. For custom types in modified function arguments, it is useful to be able to specify a custom check function so that the overload decisor finds the right type. Add a CustomTypeEntry class with a checkFunction member for this. [ChangeLog][shiboken6] It is now possible to specify a check function for custom types in the typesystem. Pick-to: 6.1 Change-Id: I21ec541afd5073dede09d359f2e2e16a0c6a0a05 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/typesystem.h')
-rw-r--r--sources/shiboken6/ApiExtractor/typesystem.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/typesystem.h b/sources/shiboken6/ApiExtractor/typesystem.h
index abbbcd049..8d2169731 100644
--- a/sources/shiboken6/ApiExtractor/typesystem.h
+++ b/sources/shiboken6/ApiExtractor/typesystem.h
@@ -279,6 +279,21 @@ private:
QScopedPointer<TypeEntryPrivate> m_d;
};
+class CustomTypeEntry : public TypeEntry
+{
+public:
+ explicit CustomTypeEntry(const QString &entryName, const QVersionNumber &vr,
+ const TypeEntry *parent);
+
+ TypeEntry *clone() const override;
+
+ QString checkFunction() const;
+ void setCheckFunction(const QString &f);
+
+protected:
+ explicit CustomTypeEntry(TypeEntryPrivate *d);
+};
+
class TypeSystemTypeEntry : public TypeEntry
{
public: