Bug 437449 - Sorting order not applied on start in some cases
Summary: Sorting order not applied on start in some cases
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.21.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-21 09:56 UTC by Alois Wohlschlager
Modified: 2021-06-01 11:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alois Wohlschlager 2021-05-21 09:56:46 UTC
SUMMARY

In some cases, when starting plasma-systemmonitor, the remembered sorting order in the process table is not applied correctly.

STEPS TO REPRODUCE
1. Sort process table by PID
2. Close system monitor
3. Reopen system monitor

OBSERVED RESULT

Processes are displayed in random order, while sorting indicator appears on "PID" column

EXPECTED RESULT

Processes are sorted by PID

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

Similar behavior is observed when sorting by username. Also happens on git master.
Comment 1 Bug Janitor Service 2021-05-27 16:35:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/137
Comment 2 David Edmundson 2021-06-01 11:20:35 UTC
Git commit 0fc74c55135632e9cb1b10baf9f645f4c299875a by David Edmundson.
Committed on 01/06/2021 at 11:19.
Pushed by davidedmundson into branch 'master'.

Fix initial sort order

BaseTableView is duplicating code in TableViewHeader, this is non-ideal.

The other issue, is that we run the lambda whilst doing the initial
Repeater population. model.row is outdated when the lambda does run.

We're best off running the existing sort method on the delegate which
will keep everything in sync.

M  +0    -3    src/table/BaseTableView.qml
M  +12   -9    src/table/TableViewHeader.qml

https://invent.kde.org/plasma/plasma-systemmonitor/commit/0fc74c55135632e9cb1b10baf9f645f4c299875a
Comment 3 David Edmundson 2021-06-01 11:21:13 UTC
Git commit d07a633824b653baddad2da6d1fa94ac4aaac39c by David Edmundson.
Committed on 01/06/2021 at 11:21.
Pushed by davidedmundson into branch 'Plasma/5.22'.

Fix initial sort order

BaseTableView is duplicating code in TableViewHeader, this is non-ideal.

The other issue, is that we run the lambda whilst doing the initial
Repeater population. model.row is outdated when the lambda does run.

We're best off running the existing sort method on the delegate which
will keep everything in sync.


(cherry picked from commit 0fc74c55135632e9cb1b10baf9f645f4c299875a)

M  +0    -3    src/table/BaseTableView.qml
M  +12   -9    src/table/TableViewHeader.qml

https://invent.kde.org/plasma/plasma-systemmonitor/commit/d07a633824b653baddad2da6d1fa94ac4aaac39c