From b714604a6795f9ed398a886c23348a2d52fbb7d1 Mon Sep 17 00:00:00 2001 From: Thomas Surrel Date: Thu, 22 Nov 2018 22:24:37 +0100 Subject: Do not sort twice when changing role and order at the same time Summary: When using the list header to change the role and order, if one changes the order to descending and then changes role, dolphin also changes the order back to ascending. This results in sorting the list of files twice in a row. This patch removes the first (useless) sort. Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17111 --- src/kitemviews/kfileitemmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/kitemviews/kfileitemmodel.h') diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index a931a28cc..3266a49f9 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -260,7 +260,7 @@ signals: protected: void onGroupedSortingChanged(bool current) override; - void onSortRoleChanged(const QByteArray& current, const QByteArray& previous) override; + void onSortRoleChanged(const QByteArray& current, const QByteArray& previous, bool resortItems = true) override; void onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous) override; private slots: -- cgit v1.3.1