diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-02-22 15:38:50 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-22 18:22:48 -0300 |
commit | 03030ce1945075d9c32ab6ada75a45b7f7f906b6 (patch) | |
tree | 4fc0af2a8ea0e1f40722767ef8c0a957c7fdd861 /PySide/QtCore | |
parent | b5128919aaa92862dec02c268a2e94c742425a9f (diff) |
Replace QChar(char) with QChar(Str)
QChar(char) was conflicting with QChar(int) due to char converter
using PyNumber_Check.
Reviewer: Renato Oliveira <renato.oliveira@openbossa.org>
Diffstat (limited to 'PySide/QtCore')
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 5348d665c..bc1511372 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -1141,6 +1141,20 @@ <modify-function signature="QChar(short)" remove="all"/> <modify-function signature="QChar(ushort)" remove="all"/> <modify-function signature="QChar(uint)" remove="all"/> + <modify-function signature="QChar(char)" remove="all"/> + Implementation note: This constructor is a replacement for + QChar(char), as the char type check also catches numbers, + conflicting with QChar(int). + <add-function signature="QChar(PyString*)"> + <inject-code class="target" position="beginning"> + if (PyString_Size(%PYARG_1) == 1) { + char value = %CONVERTTOCPP[char](%PYARG_1); + cptr = new %TYPE(value); + } else { + PyErr_SetString(PyExc_TypeError, "expected string of size 1"); + } + </inject-code> + </add-function> <modify-function signature="combiningClass(uint)" remove="all"/> <modify-function signature="combiningClass(ushort)" remove="all"/> <modify-function signature="decomposition(uint)" remove="all"/> |