diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-12-19 09:24:49 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-01-05 21:29:27 +0100 |
| commit | afba8e4a28d92c8584f2faa233372dd69887031c (patch) | |
| tree | 3b46c79ebf40c2b1a86865b7c82e734632d701fd /build_scripts/main.py | |
| parent | a8fcf44147167e186a1c7da7488ab821cc041291 (diff) | |
Fix qCompress/qUncompress() taking a PyBuffer/len arguments
The overloads taking a uchar * data argument were generated using the
converter for uchar, causing warnings:
qbytearray.h:639: There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive type 'const uchar *' of argument 1 in function 'qCompress(const uchar * data, qsizetype nbytes, int compressionLevel)'.
qbytearray.h:640: There's no user provided way (conversion rule, argument removal, custom code, etc) to handle the primitive type 'const uchar *' of argument 1 in function 'qUncompress(const uchar * data, qsizetype nbytes)'.
This was never noticed since we have a conversion from PyBuffer
to QByteArray and the overload decisor checks only whether the minimum
argument is satifisfied, so, so qCompress(data,len,level) it called
qCompress(bytearry,len), passing the length as level.
To fix this, modify the argument to PyBuffer as is done for QImage and
give it overload-number 0, so that PyBuffer is checked first without
conversion to QByteArray. Add a test for both cases.
Amends ae51319fa8a7c02642f5d35f5d613c22e9ce8ecb.
Task-number: PYSIDE-838
Change-Id: Ib9b22a24257fcf93ce3458d8514cdda2e4843f64
Reviewed-by: Christian Tismer <tismer@stackless.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'build_scripts/main.py')
0 files changed, 0 insertions, 0 deletions
