[Development] QLocale work

lars.knoll at nokia.com lars.knoll at nokia.com
Tue Jan 24 12:59:26 CET 2012


On 1/24/12 9:47 AM, "ext John Layt" <jlayt at kde.org> wrote:

>
>On 24 Jan 2012 00:23, "John Layt" <jlayt at kde.org> wrote:
>>
>> On Monday 23 Jan 2012 22:48:12 lars.knoll at nokia.com wrote:
>>
>> > I am very tempted to simply break this. localized binary numbers
>>simply
>> > don't make any sense.
>> >
>> > Cheers,
>> > Lars
>>
>> Agreed it makes no sense.
>>
>> My initial thought was just to move the code to say QString/QByteArray
>>and
>> make it hard-coded C locale, i.e. not using QLocale, until I found that
>> QLocale needs it too.  If we remove the API from QLocale then this
>>would be an
>> option, just QTextStreamPrivate::putNumber() would need a little
>>thought.
>>
>> John.
>Note also that in QLocale it is only the toInt() etc methods that provide
>the base option, the toString() methods do not. In the other classes it
>goes both ways.

Ok. My vote goes towards simply removing the base from QLocale::toInt()
and documenting that in the changes file.

QTextStream should always stream in the "C" locale if the base is not
decimal.

Cheers,
Lars




More information about the Development mailing list