mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Update the view when the sorting role changes.
svn path=/trunk/KDE/kdebase/apps/; revision=677356
This commit is contained in:
parent
b6aecc5b0f
commit
15d26d141e
2 changed files with 9 additions and 0 deletions
|
@ -34,6 +34,8 @@ void KSortFilterProxyModel::sort(int column, Qt::SortOrder order)
|
|||
QSortFilterProxyModel::sort(column, order);
|
||||
|
||||
m_sortOrder = order;
|
||||
|
||||
emit sortingRoleChanged();
|
||||
}
|
||||
|
||||
Qt::SortOrder KSortFilterProxyModel::sortOrder() const
|
||||
|
@ -46,3 +48,5 @@ bool KSortFilterProxyModel::lessThanCategoryPurpose(const QModelIndex &left,
|
|||
{
|
||||
return lessThan(left, right);
|
||||
}
|
||||
|
||||
#include "ksortfilterproxymodel.moc"
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
class LIBDOLPHINPRIVATE_EXPORT KSortFilterProxyModel
|
||||
: public QSortFilterProxyModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KSortFilterProxyModel(QObject *parent = 0);
|
||||
~KSortFilterProxyModel();
|
||||
|
@ -42,6 +44,9 @@ public:
|
|||
virtual bool lessThanCategoryPurpose(const QModelIndex &left,
|
||||
const QModelIndex &right) const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void sortingRoleChanged();
|
||||
|
||||
private:
|
||||
Qt::SortOrder m_sortOrder;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue