Commit 91ea1e29 authored by Méven Car's avatar Méven Car
Browse files

Sort by file size according to DetailsModeSettings::directorySizeCount

Test Plan: Sort by file size in details view.

Reviewers: #dolphin, ngraham, elvisangelaccio

Reviewed By: #dolphin, ngraham

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D29424
parent 31f5dc7f
...@@ -1770,12 +1770,12 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const ...@@ -1770,12 +1770,12 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const
QVariant valueA, valueB; QVariant valueA, valueB;
if (DetailsModeSettings::directorySizeCount()) { if (DetailsModeSettings::directorySizeCount()) {
valueA = a->values.value("count");
valueB = b->values.value("count");
} else {
// use dir size then // use dir size then
valueA = a->values.value("size"); valueA = a->values.value("size");
valueB = b->values.value("size"); valueB = b->values.value("size");
} else {
valueA = a->values.value("count");
valueB = b->values.value("count");
} }
if (valueA.isNull() && valueB.isNull()) { if (valueA.isNull() && valueB.isNull()) {
result = 0; result = 0;
......
Markdown is supported
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