Skip to content

Fix indicated sort order for numeric columns

Tony Wasserka requested to merge twasserka/libksysguard:fix_numeric_sort into master

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.

The indicator icon is now consistent with how other applications (e.g. Dolphin) behave: It's a rotated "greater than" sign that compares elements at the top with elements at the bottom. More importantly, it is now self-consistent within ksysguard (whereas before, ^ indicated alphabetically ascending for textual columns but numerically descending for metrics!).

Before: before

After: after

Fixes https://bugs.kde.org/show_bug.cgi?id=470903 .

Edited by Tony Wasserka

Merge request reports