Bug 470903 - Indicator icons for sorting order are reversed
Summary: Indicator icons for sorting order are reversed
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (show other bugs)
Version: 5.27.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-11 12:39 UTC by bugs.7ng0x
Modified: 2023-06-28 10:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugs.7ng0x 2023-06-11 12:39:11 UTC
SUMMARY
When sorting tasks in the system monitor by a metric of any particular column (CPU Time/Memory/...), the icon displayed next to the column header to indicate the sort order seemingly isn't consistent with the actual sort order. The indicated sort order is exactly the opposite.

I interpret the "^" and "v" indicator symbols as rotated "greater than"/"smaller than" symbols. Just like "1<4", I expect top elements to be smaller than bottom elements if the displayed 

There are probably other interpretations than this (for example one could consider the indicator symbols as stylized arrows instead, which wouldn't clearly imply any particular meaning though), but (from a design perspective) I couldn't think of any that would uniquely imply the ordering *currently* used by system monitor. More importantly, my interpretation is also consistent with MacOS and with Dolphin (the only other KDE software I could think of that has sortable columns).

STEPS TO REPRODUCE
1. Open system monitor
2. Click on the "Memory" column in system monitor to sort tasks by memory use. If need be, click twice so it shows the "^" icon

OBSERVED RESULT
The process with the largest memory consumption is at the top of the list. (NOT consistent with MacOS/Dolphin).

EXPECTED RESULT
The process with the largest memory consumption should be at the bottom of the list. The one with the *lowest* memory use should be at the top. (Consistent with MacOS and Dolphin)

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Comment 1 bugs.7ng0x 2023-06-11 13:19:25 UTC
> Just like "1<4", I expect top elements to be smaller than bottom elements if the displayed 

This should've been "Just like '1<4', I expect top elements to be smaller if the displayed icon is '^'.".

(Are edits intentionally disabled on this bugzilla instance? That's very frustrating from the reporter's perspective, and doesn't seem conducive to good bug reports.)
Comment 2 bugs.7ng0x 2023-06-28 10:19:00 UTC
Git commit 6145804afb235eecb6a7ccf36c602c23c6038289 by Tony Wasserka.
Committed on 27/06/2023 at 09:05.
Pushed by ahiemstra into branch 'master'.

Fix indicated sort order for numeric columns

Previously, the ordering function was purposely inverted to ensure a certain
initial sort order for numeric columns. However, this causes the wrong sort
indicator icon to be displayed. The desired initial ordering can instead be
adjusted by exposing Qt::InitialSortOrderRole in the ProcessModel.

M  +46   -24   processui/ProcessModel.cpp

https://invent.kde.org/plasma/libksysguard/-/commit/6145804afb235eecb6a7ccf36c602c23c6038289