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/typesystem.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/typesystem.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/typesystem.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/typesystem.h b/sources/shiboken6/ApiExtractor/typesystem.h index fada1fea3..52ad0d435 100644 --- a/sources/shiboken6/ApiExtractor/typesystem.h +++ b/sources/shiboken6/ApiExtractor/typesystem.h @@ -582,6 +582,10 @@ public: TypeSystem::SnakeCase snakeCase() const; void setSnakeCase(TypeSystem::SnakeCase sc); + // Determined by AbstractMetaBuilder from the code model. + bool isValueTypeWithCopyConstructorOnly() const; + void setValueTypeWithCopyConstructorOnly(bool v); + #ifndef QT_NO_DEBUG_STREAM void formatDebug(QDebug &debug) const override; #endif |