diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-06-21 09:18:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-06-21 11:36:02 +0000 |
commit | 72fff9728579b60643282bf7ccba5659975ca052 (patch) | |
tree | ad77ee4c35cfef4845e3710d3402cd8a9611eea2 | |
parent | ff5b5ccf88aefb371c07776a3ac790213d299344 (diff) |
shiboken6: Disable generation of array fields
There is no Python -> C++ conversion for primitive fields yet and it
and it seems to be not easily possible to bind an T&operator[](int)
so that an assignment foo.array[3] = 5 works.
Task-number: PYSIDE-1602
Change-Id: Ifd24ec984b3f71db6e486d959cf635116b9bbf95
Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetafield.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetafield.cpp b/sources/shiboken6/ApiExtractor/abstractmetafield.cpp index caa7772da..44e8ddc84 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetafield.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetafield.cpp @@ -188,12 +188,13 @@ void AbstractMetaField::setSetterEnabled(bool e) bool AbstractMetaField::canGenerateGetter() const { - return d->m_getterEnabled && !isStatic(); + return d->m_getterEnabled && !isStatic() && !d->m_type.isArray(); } bool AbstractMetaField::canGenerateSetter() const { return d->m_setterEnabled && !isStatic() + && !d->m_type.isArray() && (!d->m_type.isConstant() || d->m_type.isPointerToConst()); } |