Commit 38d27d1b authored by Rafael Fernández López's avatar Rafael Fernández López
Browse files

Update the view when the sorting role changes.

svn path=/trunk/KDE/kdebase/apps/; revision=677356
parent c5c3256e
......@@ -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;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment