From d062256db2c0590b7628ad7dcb9e720a5ef4f4a9 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 29 Oct 2011 19:50:15 +0200 Subject: Fix grouping-issue with not visible sorting roles It must be assured that the data for a sorting role always is determined even it is not shown as "additional info" in the view. --- src/kitemviews/kitemlistview.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/kitemviews/kitemlistview.h') diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index fd2f286db..397ecedf5 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -252,10 +252,13 @@ protected slots: virtual void slotItemsChanged(const KItemRangeList& itemRanges, const QSet& roles); + virtual void slotGroupedSortingChanged(bool current); + virtual void slotSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous); + virtual void slotSortRoleChanged(const QByteArray& current, const QByteArray& previous); + virtual void slotCurrentChanged(int current, int previous); + virtual void slotSelectionChanged(const QSet& current, const QSet& previous); + private slots: - void slotGroupedSortingChanged(bool current); - void slotCurrentChanged(int current, int previous); - void slotSelectionChanged(const QSet& current, const QSet& previous); void slotAnimationFinished(QGraphicsWidget* widget, KItemListViewAnimation::AnimationType type); void slotLayoutTimerFinished(); @@ -347,6 +350,13 @@ private: */ void recycleGroupHeaderForWidget(KItemListWidget* widget); + /** + * Helper method for slotGroupedSortingChanged(), slotSortOrderChanged() + * and slotSortRoleChanged(): Iterates through all visible items and updates + * the group-header widgets. + */ + void updateVisibleGroupHeaders(); + /** * @return The widths of each visible role that is shown in the KItemListHeader. */ -- cgit v1.3.1