From 7e0d3e04ce96ce59caeac8cd5aa970530b55c0ab Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sat, 10 Jul 2021 18:40:59 +0200 Subject: [PATCH 1/2] GIT_SILENT Upgrade release service version to 21.07.80. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2667c26dc5..9679e4a6f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "21") set (RELEASE_SERVICE_VERSION_MINOR "07") -set (RELEASE_SERVICE_VERSION_MICRO "70") +set (RELEASE_SERVICE_VERSION_MICRO "80") set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") project(Dolphin VERSION ${RELEASE_SERVICE_VERSION}) From baaf0c29b857997720b9cb0d584a44306963fb97 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 10 Jul 2021 19:35:26 +0200 Subject: [PATCH 2/2] Ensure stable sort order when sorting by size Folders with equal size caused the sort operation to become unstable, as the result of lessThan was non-deterministic. We need the fallback mechanisms at the bottom of the function to resovle the situation and provide a stable sort order. This also fixes expanding the contents of a folder into the wrong parent. BUG: 433247 FIXED-IN: 21.08 --- src/kitemviews/kfileitemmodel.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 9441bc8714..e03ec7c0e9 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1798,17 +1798,25 @@ int KFileItemModel::sortRoleCompare(const ItemData* a, const ItemData* b, const auto valueB = b->values.value("count"); if (valueA.isNull()) { if (valueB.isNull()) { - return 0; + result = 0; + break; } else { - return -1; + result = -1; + break; } } else if (valueB.isNull()) { - return +1; + result = +1; + break; } else { if (valueA.toLongLong() < valueB.toLongLong()) { - return -1; + result = -1; + break; + } else if (valueA.toLongLong() > valueB.toLongLong()) { + result = +1; + break; } else { - return +1; + result = 0; + break; } } }