From acaa0e5ce430d87eea1d76620e3b9e3584a55f86 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 10 Sep 2021 14:58:54 +0200 Subject: shiboken6: Refactor handling of values with copy constructor only ShibokenGenerato::valueTypeWithCopyConstructorOnly() is frequently called when writing argument conversions. Instead of repeatedly searching for classes and looping its functions, determine the value once in AbstractMetaBuilder and set it as a boolean flag on class and type entry. Move the functions from ShibokenGenerator to AbstractMetaType. Task-number: PYSIDE-1605 Change-Id: If6701ff87b8dd23039f1d35daa6c9291acd0aa87 Reviewed-by: Christian Tismer --- sources/shiboken6/ApiExtractor/abstractmetalang.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h') diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h index f08ed2039..cc7fd7cec 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h @@ -348,6 +348,8 @@ public: bool isObjectType() const; bool isCopyable() const; bool isValueTypeWithCopyConstructorOnly() const; + void setValueTypeWithCopyConstructorOnly(bool v); + static bool determineValueTypeWithCopyConstructorOnly(const AbstractMetaClass *c); static AbstractMetaClass *findClass(const AbstractMetaClassList &classes, const QString &name); -- cgit v1.2.3