| Summary: | Ordering by VmRss doesn't order by numeric value | ||
|---|---|---|---|
| Product: | [Unmaintained] ksysguard | Reporter: | Miguel Angel Lopez <bufalo1973> |
| Component: | general | Assignee: | KSysGuard Developers <ksysguard-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Miguel Angel Lopez
2006-08-18 01:08:00 UTC
Sorry. Numbers aren't treated like strings. It's a wrong order by not using locale to know which is the decimal and the thousands separators. I cannot replicate this bug. When I order by VmRss, it works fine. The code for kde3.5 is: int prev = (int)KGlobal::locale()->readNumber( key( col, ascending ) ); int next = (int)KGlobal::locale()->readNumber( item->key( col, ascending ) ); ... Why would that not be working? SVN commit 608993 by johnflux:
Fix a small bug with reading in the number. D means a localised int, not a double.
BUG:132579
M +1 -1 ProcessList.cc
--- branches/KDE/3.5/kdebase/ksysguard/gui/SensorDisplayLib/ProcessList.cc #608992:608993
@@ -663,7 +663,7 @@
else if ( mColumnTypes[col] == "f" )
pli->setText( col, KGlobal::locale()->formatNumber( (*p)[col].toFloat() ) );
else if ( mColumnTypes[col] == "D" )
- pli->setText( col, KGlobal::locale()->formatNumber( (*p)[col].toDouble(), 0 ) );
+ pli->setText( col, KGlobal::locale()->formatNumber( (*p)[col].toInt(), 0 ) );
else
pli->setText(col, (*p)[col]);
}
|