Skip to content
Commit a9f2f455 authored by Artur Puzio's avatar Artur Puzio Committed by Kevin Funk
Browse files

Vcs: Fix sorting of files in the commit dialog

Summary:
This fixes [[ https://bugs.kde.org/show_bug.cgi?id=183625 | Bug 183625 ]]
In the commit dialog files whern't sorted. They are showed using VcsFileCHangesModel. I overloaded `operator <` of `VcsStatusInfoItem` to sort them. The sorting rules are:
1. versioned files before uneversioned
2. alphabetically (by path)

Details:
Added possibility to access the state of file in `VcsFileChangesModel` (not used in the end)
Introduced `enum ColumnsRoles` in `VcsFileChangesModel`: `{ PathColumn = 0, StatusColumn = 1 }` (not used in the end)
Overloaded `operator <` of `VcsStatusInfoItem` to compare according to the rules
Used `QSortFilterProxyModel` in patchreviewtoolview to sort the list of changed files

Test Plan: Manually testing revealed no problems.

BUG: 183625
Reviewers: kfunk

Subscribers: kdevelop-devel

Differential Revision: https://phabricator.kde.org/D862
parent 5f3e04f5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment