Version: 1.2.0 (using KDE 3.1.9) Compiler: gcc version 3.2 OS: Linux (i686) release 2.4.18-4GB KSysGuard should use KLocale::formatNumber() instead of QString::setNum or QString::number to convert integers or doubles into strings. If not, KSysGuard will use wrong decimal separators and there will be no group separators.
Subject: Re: New: ksysguard doesn't respect locale settings for numbers On Sat, Dec 28, 2002 at 10:00:23PM -0000, Hans Petter Bieker wrote: Hi Hans, > KSysGuard should use KLocale::formatNumber() instead of QString::setNum We do not use QString::setNum in the sources at all. Where did you find this code? > or QString::number to convert integers or doubles into strings. The only place we use QString::number is in SensorManager. It is used to convert integers in a range from 0 to 25 into strings. No problems with doubles here. Ciao, Tobias
> > KSysGuard should use KLocale::formatNumber() instead of QString::setNum > We do not use QString::setNum in the sources at all. Where did you find > this code? Okay, sorry. I haven't checked the code, I have only used KSysGuard as a black box. > > or QString::number to convert integers or doubles into strings. > The only place we use QString::number is in SensorManager. It is used > to convert integers in a range from 0 to 25 into strings. No problems > with doubles here. Change your locale to use "," as decimal separator. Then look at "User%" and "System%" in the process table. They will still use ".". I guess the reason is that ksysguard doesn't convert the input from the backend using KLocale::formatNumber(). HOWTOFIX: All integers and doubles should be converted using something like this: KGlobal::locale()->formatNumber(str.toDouble()) before displaying..
It should be fixed in CVS HEAD now. Thank you for the report
KLocale::formatNumber should also be used on large integers. * Process Table: VmSize, VmRSS * Status line: Memory: %1 KB used, %2 KB free... And swap * Signal plotter (e.g. Clock Frequency) * Disk partition table