| Summary: | CPU Load Column Sort is backwards | ||
|---|---|---|---|
| Product: | [Unmaintained] ksysguard | Reporter: | John Andersen <jsamyth> |
| Component: | ksysguard | Assignee: | KSysGuard Developers <ksysguard-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | cfeck, richard.llom |
| Priority: | NOR | ||
| Version First Reported In: | 4.10.3 | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
John Andersen
2013-07-02 19:52:32 UTC
I guess that's intentional and expected. If you click on a column, for example the column to sort by memory size, you are usually interested to see the processes consuming most memory on the top. So the default sort order is the "expected" order, and clicking on the column header twice instead of once makes it sort in the "reverse" order. The Arrow (sort order indicator) in the column header should indicate the sort order regardless of what one feels the user might be interested in. This has nothing at all to do with what is the default order. Its all about the indicators in the column headings. The Arrow (sort order indicator) for the Name column and the User column work properly. The sort order indicators for the numeric columns (CPU, Memory and shared Memory) are reversed. That's a limitation by the Qt library. If you click on a column once, it always sets the sorting to ascending order. If you want descending order as the default (primary) order, the programmer has to reverse the comparisons internally. It is not a limitation of the library. It is simply programmer forgetfulness. Which is exactly why I filed the bug report, so that the programmer can be clued in to the need to do this. Dolphin gets it right, there is no reason System Monitor can't get it right. Its a minor bug, which certainly doesn't need to be cleaned up right away. But by the same token we don't need people saying its a limitation of the library. It is clear you do not understand the issue here. I urge you to re-read the bug report. When the column sort order says it is ascending, it is actually descending and vise versa. Dolphin does not use QHeaderView, but has a custom class. (... but I don't see Dolphin doing it differently, clicking on a section header it sorts with arrow pointing down, regardless of which column you click. If you click a second time, the arrow points up, and you get the reverse order.) Actually, by your reasoning, Dolphin has the same bug. Clicking on the size column (once), it sorts numerically from smaller to larger numbers. Clicking on the date column, it sorts from newest to olders, i.e. numerically from larger to smaller numbers, but this has been done because it is the expected behavior. Otherwise would have to click twice on the date column. Scratch the last comment, that's because of my local patch in kdelibs, making newest to oldest the default sorting order. You are right, since Qt 4.8 the library no longer has this limitation. Actually, John (current maintainer of KSysguard) contributed to the new Qt::InitialSortOrderRole to be able to fix this bug. See http://qt.gitorious.org/qt/qt/merge_requests/814 The Arrow (sort order indicator) correctly display the sorting in v 5.15. Closing as FIXED |