diff options
| author | Rafael Fernández López <[email protected]> | 2007-12-03 19:43:11 +0000 |
|---|---|---|
| committer | Rafael Fernández López <[email protected]> | 2007-12-03 19:43:11 +0000 |
| commit | 2766a176136e3851ed4093f9c20c6a4e71332554 (patch) | |
| tree | d97062a2629c3a8ed02b670e968ad0b088ee7a3d /src | |
| parent | f4614fd066b821ed19253e4811a1bf2dced36478 (diff) | |
More logic fixes
svn path=/trunk/KDE/kdebase/apps/; revision=744490
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinsortfilterproxymodel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dolphinsortfilterproxymodel.cpp b/src/dolphinsortfilterproxymodel.cpp index ed84ef8f6..95fb3854d 100644 --- a/src/dolphinsortfilterproxymodel.cpp +++ b/src/dolphinsortfilterproxymodel.cpp @@ -105,9 +105,9 @@ int DolphinSortFilterProxyModel::compareCategories(const QModelIndex &left, switch (left.column()) { case DolphinView::SortByRating: { - const quint32 leftRating = DolphinModel::ratingForIndex(left); - const quint32 rightRating = DolphinModel::ratingForIndex(right); - return leftRating > rightRating; + const qint32 leftRating = DolphinModel::ratingForIndex(left); + const qint32 rightRating = DolphinModel::ratingForIndex(right); + return leftRating - rightRating; } case DolphinView::SortByTags: { @@ -115,9 +115,9 @@ int DolphinSortFilterProxyModel::compareCategories(const QModelIndex &left, const QString rightTags = DolphinModel::tagsForIndex(right); if (leftTags.isEmpty() && !rightTags.isEmpty()) - return false; + return -1; else if (!leftTags.isEmpty() && rightTags.isEmpty()) - return true; + return 1; return naturalCompare(DolphinModel::tagsForIndex(left), DolphinModel::tagsForIndex(right)) < 0; } |
