aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2009-11-10 20:34:44 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-11-10 20:45:04 -0200
commitb8a07a9e0eca74ebdbd1d4e1537d47764f494c15 (patch)
tree337656c8c3e5d6f8dd4b4d2df71d737981a80027
parentb164e617a21654e4ac28bda4c65d16787651f49d (diff)
Change QByteArray constructor to accept \x00 bytes
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
-rw-r--r--PySide/QtCore/typesystem_core.xml7
1 files changed, 7 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index bbf56608f..e210d527e 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -1254,6 +1254,13 @@
<extra-includes>
<include file-name="QNoImplicitBoolCast" location="global"/>
</extra-includes>
+ <modify-function signature="QByteArray(const char *)">
+ <!-- Keep \x00 bytes passed in python strings -->
+ <inject-code class="target" position="beginning">
+ int size = PyString_Size(pyargs[0]);
+ cptr = new QByteArray(cpp_arg0, size);
+ </inject-code>
+ </modify-function>
<!-- removed functions -->
<modify-function signature="begin()" remove="all"/>
<modify-function signature="begin()const" remove="all"/>