Summary: | Todo list sorting by priority: Sort "Unspecified" priority separately | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Steven Rosario <srosariomd> |
Component: | todoview | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | chip, smartins, tom_t |
Priority: | NOR | ||
Version: | 4.1 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Steven Rosario
2008-10-18 04:51:14 UTC
Hi there! If you want to add this feature, look at kdepim/korganizer/views/todoview/kotodoviewsortfilterproxymodel.cpp, method lessThan(). The feature you describe should be implemented in almost the same fashion as the feature to sort completed todo's at the bottom, which is already realised in this method. Altough, you should check if sorting is performed on the priority column (something like left.column() == KOTodoModel::PriorityColumn), and then check if the priority of either the left or right index is 0 ([left|right].data( Qt::EditRole ).toInt() == 0). If so, sort by yourself (return true or false depending on the sorting order), and if neither left nor right have priority 0, just leave the sorting to Qt (return QSortFilterProxyModel::lessThan( left, right )). Maybe you can provide a patch with this, unfortunately I'm currently not able to develop myself. If you want to further expand this feature, add an option to turn it on or off. Just search in the KOrganizer source for sortCompletedTodosSeparately or similar, and add another along with it. Regards, Thomas I'd like to "CONFIRM" this but I can't. I'm certainly seeing it. IMHO, this is a bug and it's trivial enough to fix inside the feature freeze. SVN commit 977606 by smartins: While sorting, "Unspecified" priority must be treated as a low priority. BUG: 173079 M +9 -0 kotodoviewsortfilterproxymodel.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=977606 |