diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-10 14:58:54 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-11 07:57:17 +0200 |
commit | acaa0e5ce430d87eea1d76620e3b9e3584a55f86 (patch) | |
tree | cce83caa766e7d69de3be3bee5990b2b3e79baea /sources/shiboken6/ApiExtractor/abstractmetalang.h | |
parent | a4a23da2df6af79f03f0d10bd10a18b3cb437396 (diff) |
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 <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.h | 2 |
1 files changed, 2 insertions, 0 deletions
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); |