Bug 382892

Summary: Sorting by column does not work properly
Product: [Unmaintained] muon Reporter: Glenn Coombs <glenn.coombs>
Component: muonAssignee: Jonathan Thomas <echidnaman>
Status: RESOLVED FIXED    
Severity: minor CC: bugseforuns, glenn.coombs, silhusk
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Sort by "Status" not correct

Description Glenn Coombs 2017-07-29 09:14:11 UTC
I am running the Muon Package Manager (version 5.7.0) on KDE Neon User Edition 5.10.  

After selecting the "By Status" filter on the left I then clicked the Status column header to sort on that field.  The view changed but the sorted order is not correct (see attached screen shot) as it shows packages with status "Installed", then some packages marked "Upgradeable", and then some more packages marked "Installed".  I would expect to see all packages marked "Installed" followed by all packages marked "Upgradeable".

Additionally, attempting to sort by "Installed Size", "Installed Version" or "Available Version" does nothing - the column header changes to show the sort order but the lines below never change order.
Comment 1 Glenn Coombs 2017-07-29 09:16:10 UTC
Created attachment 106939 [details]
Sort by "Status" not correct
Comment 2 Carlo Vanini 2018-06-08 11:50:43 UTC
Git commit ec14a8f27dc24f75b9712e56814e6e88aba00651 by Carlo Vanini.
Committed on 08/06/2018 at 11:47.
Pushed by vanini into branch 'master'.

fix sort by status or requested change

Summary:
Sorting was considering less package states than what is shown to the
user. For instance Upgradeable was not taken into account and the
package was sorted just as Installed, that resulted in a list that could
contain Installed, then Upgradeable and then Installed again.

Reviewers: sitter

Reviewed By: sitter

Differential Revision: https://phabricator.kde.org/D13417

M  +6    -0    src/PackageModel/PackageProxyModel.cpp

https://commits.kde.org/muon/ec14a8f27dc24f75b9712e56814e6e88aba00651