[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] =?utf-8?q?Pylupdate4_does_not_parse_tr=28u=22=22=29_=3F?=
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2011-06-24 10:56:40
Message-ID: 9fbfa02bc64e5a7c9cd4bc1d36986983 () localhost
[Download RAW message or body]

On Mon, 13 Jun 2011 14:43:05 +0200, Giuseppe Corbelli
<giuseppe.corbelli@copanitalia.com> wrote:
> On 10/06/2011 10:52, Giuseppe Corbelli wrote:
>> So it seems that pylupdate4 does NOT parse tr(u"") stuff. Is it by
>> design?
>> Sorry but I can't dive into it at present.
> 
> Seems that I was right, rare stuff indeed.
> 
> Look into pylupdate/fetchtr.cpp, around line 380
> You will see a
> 
> case '(':
>     if (yyParenDepth == 0)
>       yyParenLineNo = yyCurLineNo;
>     yyParenDepth++;
>     yyCh = getChar();
>     return Tok_LeftParen;
> 
> 
> Replace with:
> 
> case '(':
>     if (yyParenDepth == 0)
>         yyParenLineNo = yyCurLineNo;
>     yyParenDepth++;
>     yyCh = getChar();
>     //It may be a tr(u"whatever"), skip the 'u'
>     if (yyCh == 'u')
>         yyCh = getChar();
>     return Tok_LeftParen;
> 
> It seems to work (just eats one more char). If you find it useful please
> apply
> into the main line.

This is fixed (differently) in tonight's snapshot.

Thanks,
Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic