[Kde-bindings] Using i18n

Shaheed Haque srhaque at theiet.org
Mon May 6 08:39:13 UTC 2013


Hi Luca,

I already looked :-). Anyway, the SIP code uses this call:

          arg = (QString *)sipForceConvertToType(pyarg, sipType_QString,
NULL, SIP_NOT_NONE, &state, &iserr);

But having reviewed the docs at
http://pyqt.sourceforge.net/Docs/sip4/c_api.html, and the
implementation of sip_api_force_convert_to_type()
in
http://www.riverbankcomputing.co.uk/hg/sip/file/fc54ee3b5308/siplib/siplib.c,
all I can tell is that this code has not been changed since 2008. So, I
guess the problem lies deep in the innards of the SIP library where Python
strings are handled.

If my guess is right, then I'm not sure how siplib.c works because I would
thought it would need the same kind of version-dependent hackery I had to
add to the Pate plugin (in utlities.cpp)  to handle all the variations in
Python's C API, but all I see is some tests for HAVE_WCHAR_T. AFAIK, that's
not enough, but I expect I have simply not guessed correctly.

Thanks, Shaheed



On 6 May 2013 08:19, Luca Beltrame <lbeltrame at kde.org> wrote:

> In data domenica 5 maggio 2013 16:46:36, Philipp A. ha scritto:
> > i wrote an analysis of the behavior here. It seems that the bug surfaces
> in
> > both python 2 and python 3.
>
> Shaheed, the i18n() calls use custom Python code. Can you take a look at
> kdecore/klocalizedstring.sip in PyKDE4 and see if the code there (only the
> Python C API bits) looks off? I'm not familiar with the Python API enough
> to
> make a guess.
>
> --
> Luca Beltrame - KDE Forums team
> KDE Science supporter
> GPG key ID: 6E1A4E79
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20130506/16f45ccc/attachment.html>


More information about the Kde-bindings mailing list