Summary: | ksysguard doesn't respect locale settings for numbers | ||
---|---|---|---|
Product: | [Applications] ksysguard | Reporter: | Hans Petter Bieker <bieker> |
Component: | general | Assignee: | KSysGuard Developers <ksysguard-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Hans Petter Bieker
2002-12-28 23:00:19 UTC
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 |