aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-08-28 21:36:28 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-08-29 09:32:15 +0200
commit940cad174f891a4b04af9bcc61aed1c8e8c6d4ae (patch)
tree5d4a39e0aa6991c20eb9b09c2a02c4b8a0385655 /sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
parent74a2ec0202af250828c10dfb10b71036a3af9dd8 (diff)
PySide6: Fix up QDataStream.readRawData/writeRawData()
writeRawData() was historically implemented to take a string. Fix the signature. Add an overload for PyBuffer/bytes. Fix the return type of readRawData() to be bytes. Fixes: PYSIDE-2442 Change-Id: I1684afd5aae2f8d118fa2fac87d916c23bd4a59e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtCore/typesystem_core_common.xml')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index e92680b68..f1d3609b0 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -2738,12 +2738,18 @@
<inject-code class="target" position="end" file="../glue/qtcore.cpp" snippet="stream-read-method"/>
</add-function>
<modify-function signature="readRawData(char*,int)">
+ <modify-argument index="return" pyi-type="bytes"/>
<modify-argument index="1">
<remove-argument />
</modify-argument>
<inject-code class="target" file="../glue/qtcore.cpp" snippet="qdatastream-readrawdata"/>
</modify-function>
+ <add-function signature="writeRawData(PyBuffer)">
+ <inject-code class="target" position="beginning"
+ file="../glue/qtcore.cpp" snippet="qdatastream-writerawdata-pybuffer"/>
+ </add-function>
<modify-function signature="writeRawData(const char*,int)">
+ <modify-argument index="1" pyi-type="str"/>
<modify-argument index="2">
<remove-argument />
</modify-argument>