aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-01-27 14:20:22 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-02-02 18:19:28 -0200
commit5e0169fe506aafe246029acd6f90ecef054fc074 (patch)
tree4fd2b32cd46af0195ccd80dbcd217eedce812a7f /PySide/QtCore
parent2cee6b6fca0c9b4188b7fb10643f77a719b792fc (diff)
Adding tests and fixing QString __setitem__ and []
Instead of calling replace, using remove/insert, as there's no way of replacing only 1 char at a given position by another string directly.
Diffstat (limited to 'PySide/QtCore')
-rw-r--r--PySide/QtCore/typesystem_core.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index bbf43fdd1..7a2252625 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -1071,8 +1071,9 @@
</add-function>
<add-function signature="__setitem__">
<inject-code class="target" position="beginning">
+ %CPPSELF.remove(_i, 1);
PyObject* args = Py_BuildValue("(nO)", _i, _value);
- PyObject* result = SbkQStringFunc_replace(self, args);
+ PyObject* result = SbkQStringFunc_insert(self, args);
Py_DECREF(args);
Py_XDECREF(result);
return !result ? -1 : 0;