diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-01-25 15:43:43 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-26 18:04:24 -0200 |
commit | efd2f934467323a1b25b167e86b2aa297c1f1283 (patch) | |
tree | 53961aa33da0f06a569c3095beed202f6e0f2a3a /PySide/QtCore/qstring_conversions.h | |
parent | 9523cb207abbdca410679df27c0fe10ac1688dd9 (diff) |
Adding cast to QString::fromUcs4 call
Some systems (Ubuntu 32-bits) were failing to compile
due to Py_UNICODE being unsigned long
Reviewed by Hugo Parete <hugo.lima@openbossa.org>
Diffstat (limited to 'PySide/QtCore/qstring_conversions.h')
-rw-r--r-- | PySide/QtCore/qstring_conversions.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/PySide/QtCore/qstring_conversions.h b/PySide/QtCore/qstring_conversions.h index 48f3b77e0..b2dc61952 100644 --- a/PySide/QtCore/qstring_conversions.h +++ b/PySide/QtCore/qstring_conversions.h @@ -23,7 +23,8 @@ inline QString Converter< QString >::toCpp(PyObject* pyobj) } else if (PyUnicode_Check(pyobj)) { Py_UNICODE* unicode = PyUnicode_AS_UNICODE(pyobj); #if defined(Py_UNICODE_WIDE) - return QString::fromUcs4(unicode); + // cast as Py_UNICODE can be a different type + return QString::fromUcs4(reinterpret_cast<const uint*>(unicode)); #else return QString::fromUtf16(unicode, PyUnicode_GET_SIZE(pyobj)); #endif |