D13866: Fix ResultModel item moving
David Edmundson
noreply at phabricator.kde.org
Tue Jul 3 11:30:12 BST 2018
davidedmundson created this revision.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: kde-frameworks-devel.
davidedmundson requested review of this revision.
REVISION SUMMARY
The intention of this code is to find the new insertion index in the
cache where a resource should now be by counting number of items in the
cache with a higher score/update time/whatever.
FixedItems comparison compares two resources by string IDs, checking if
they're user pinned. If so they go on top.
In FullOrdering if neither compared item is pinned it also compares literal
resourceId. Useful if you have no other sorting tests and want to
maintain order, not useful if we want to contintue to compare the score
as in 50% case of the cases we'll fail our lessThan early.
BUG: 396102
TEST PLAN
Ran test app
Changed some scores by clicking in kickoff
They moved appropriately instead of being moved all over the place
REPOSITORY
R159 KActivities Statistics
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D13866
AFFECTED FILES
src/resultmodel.cpp
To: davidedmundson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180703/c22e8c34/attachment.html>
More information about the Kde-frameworks-devel
mailing list