aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside6/PySide6/glue/qtcore.cpp6
-rw-r--r--sources/pyside6/PySide6/glue/qtgui.cpp2
-rw-r--r--sources/pyside6/PySide6/templates/gui_common.xml2
3 files changed, 5 insertions, 5 deletions
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp
index 8228e3c19..41817a2c7 100644
--- a/sources/pyside6/PySide6/glue/qtcore.cpp
+++ b/sources/pyside6/PySide6/glue/qtcore.cpp
@@ -647,8 +647,8 @@ static void msgHandlerCallback(QtMsgType type, const QMessageLogContext &ctx, co
PyTuple_SET_ITEM(arglist, 0, %CONVERTTOPYTHON[QtMsgType](type));
PyTuple_SET_ITEM(arglist, 1, %CONVERTTOPYTHON[QMessageLogContext &](ctx));
QByteArray array = msg.toUtf8(); // Python handler requires UTF-8
- char *data = array.data();
- PyTuple_SET_ITEM(arglist, 2, %CONVERTTOPYTHON[char *](data));
+ const char *data = array.constData();
+ PyTuple_SET_ITEM(arglist, 2, %CONVERTTOPYTHON[const char *](data));
Shiboken::AutoDecRef ret(PyObject_CallObject(qtmsghandler, arglist));
}
static void QtCoreModuleExit()
@@ -1427,7 +1427,7 @@ if (result == -1) {
Py_INCREF(Py_None);
%PYARG_0 = Py_None;
} else {
- %PYARG_0 = PyBytes_FromStringAndSize(data.data(), result);
+ %PYARG_0 = PyBytes_FromStringAndSize(data.constData(), result);
}
// @snippet qdatastream-readrawdata
diff --git a/sources/pyside6/PySide6/glue/qtgui.cpp b/sources/pyside6/PySide6/glue/qtgui.cpp
index 6b30952d2..5b91790cf 100644
--- a/sources/pyside6/PySide6/glue/qtgui.cpp
+++ b/sources/pyside6/PySide6/glue/qtgui.cpp
@@ -474,7 +474,7 @@ const auto points = PySide::Numpy::xyDataToQPointFList(%PYARG_1, %PYARG_2);
// @snippet qpainter-drawpointsnp-numpy-x-y
// @snippet qpainter-drawpolygon
-%CPPSELF.%FUNCTION_NAME(%1.data(), %1.size(), %2);
+%CPPSELF.%FUNCTION_NAME(%1.constData(), %1.size(), %2);
// @snippet qpainter-drawpolygon
// @snippet qmatrix4x4
diff --git a/sources/pyside6/PySide6/templates/gui_common.xml b/sources/pyside6/PySide6/templates/gui_common.xml
index 874f8df5f..b802054a8 100644
--- a/sources/pyside6/PySide6/templates/gui_common.xml
+++ b/sources/pyside6/PySide6/templates/gui_common.xml
@@ -172,7 +172,7 @@
</template>
<template name="qpainter_drawlist">
- %CPPSELF.%FUNCTION_NAME(%1.data(), %1.size());
+ %CPPSELF.%FUNCTION_NAME(%1.constData(), %1.size());
</template>
<template name="inplace_add">