aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-05-25 10:34:31 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-05-25 19:10:11 +0200
commit2b885c0fa6148b96ec88c0f6720bdffd5b4f2ef5 (patch)
tree7ad86c98041b8c79a4eb8a1966a06b04f87ca33a /sources
parent0eb2cde3fee7e3cdc2e1273001ae532c499680e5 (diff)
Revert "Fix crashes when using the QImage(uchar *) data constructors"
It breaks a use case in pyqtgraph, which expects to be able to manipulate the image by modifying the data. This reverts commit cc011c8980cc4ce02e3d9cceb74ee028c204214e. The helper Shiboken::Buffer::copyData() is left in place since it can be useful for other cases. Task-number: PYSIDE-1563 Change-Id: Ib0d58662a4257a315865436a32e99d9ee6369e03 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 4daaa2edd881865172f19c007c69113bf4afc8cd)
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside2/PySide2/templates/gui_common.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside2/PySide2/templates/gui_common.xml b/sources/pyside2/PySide2/templates/gui_common.xml
index 16116877f..a139a5fe9 100644
--- a/sources/pyside2/PySide2/templates/gui_common.xml
+++ b/sources/pyside2/PySide2/templates/gui_common.xml
@@ -80,8 +80,8 @@
</template>
<template name="qimage_buffer_constructor">
- auto *ptr = reinterpret_cast&lt;uchar *&gt;(Shiboken::Buffer::copyData(%PYARG_1));
- %0 = new %TYPE(ptr, %ARGS, std::free);
+ auto ptr = reinterpret_cast&lt;uchar*&gt;(Shiboken::Buffer::getPointer(%PYARG_1));
+ %0 = new %TYPE(ptr, %ARGS);
</template>
<template name="qcolor_repr">