[Differential] [Request, 110 lines] D862: [Fixed Bug 183625] Sorting of files in the commit dialog
apuzio (Artur Puzio)
noreply at phabricator.kde.org
Tue Jan 26 18:41:17 UTC 2016
apuzio created this revision.
apuzio added a reviewer: kfunk.
Herald added a subscriber: kdevelop-devel.
REVISION SUMMARY
In the commit dialog files whern't sorted. They are showed using VcsFileCHangesModel. I introduced a VcsChangesSortProxyModel 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`
Introduced `enum ColumnsRoles` in `VcsFileChangesModel`: `{ PathColumn = 0, StatusColumn = 1 }`
Introduced `VcsFileChangesSortProxyModel` that inherits from QSortFilterProxyModel with overloaded `lessThan()` function to compare using the sorting rules.
Used `VcsFileChangesSortProxyModel` in patchreviewtoolview
TEST PLAN
Manually testing revealed no problems.
REPOSITORY
rKDEVPLATFORM KDevPlatform
BRANCH
sort_commit_file_list
REVISION DETAIL
https://phabricator.kde.org/D862
AFFECTED FILES
plugins/patchreview/patchreviewtoolview.cpp
plugins/patchreview/patchreviewtoolview.h
vcs/CMakeLists.txt
vcs/models/vcsfilechangesmodel.cpp
vcs/models/vcsfilechangesmodel.h
vcs/models/vcsfilechangessortproxymodel.cpp
vcs/models/vcsfilechangessortproxymodel.h
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: apuzio, kfunk
Cc: kdevelop-devel
More information about the KDevelop-devel
mailing list