┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.h
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-08-04 22:20:37 +0200
committerFrank Reininghaus <[email protected]>2013-08-04 22:20:37 +0200
commit6524bf701a04e09ce31a7793ccccbedefc11e514 (patch)
tree4b0b05283c2b072d5b6e0b44054bb687e509f8f5 /src/kitemviews/kitemlistview.h
parentbedf1db916ae80a3c27062cbd86f476d166fd51c (diff)
Introduce a new signal "groupsChanged"
Sometimes when items are renamed, the order of the items in the directory is not affected, but the groups still change (simple example: with files a, b, c, e, rename "c" to "d"). At the moment, we always emit the itemsMoved signal in such a case to make sure that the view is updated. However, it would be preferable if this signal was not emitted because it can trigger some quite expensive operations which are not needed at all. This commit introduces a new signal groupsChanged and modifies KFileItemModel and KItemListView such that these classes make use of it. Some unit tests for the new functionality are included as well. Thanks to Emmanuel Pescosta for finding a latent bug in the code which was triggered by this change and fixed in 998954db6d53999dfa75d380cbb4ca3111589f66. REVIEW: 111808
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
-rw-r--r--src/kitemviews/kitemlistview.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h
index 6467b8c91..14360b02b 100644
--- a/src/kitemviews/kitemlistview.h
+++ b/src/kitemviews/kitemlistview.h
@@ -394,6 +394,7 @@ protected slots:
virtual void slotItemsMoved(const KItemRange& itemRange, const QList<int>& movedToIndexes);
virtual void slotItemsChanged(const KItemRangeList& itemRanges,
const QSet<QByteArray>& roles);
+ virtual void slotGroupsChanged();
virtual void slotGroupedSortingChanged(bool current);
virtual void slotSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous);