Fix Ride List not refreshing

A bug was introduced by the new search/filter update causing the
ride list to not get refreshed when rides were imported or deleted.
This was due to signals from the source model (sql) not being propagated
upstream (groupby) in the standard implementation of qsortfilterproxymodel.

This patch fixes that.
This commit is contained in:
Mark Liversedge
2012-10-22 11:16:36 +01:00
parent 1acd5ea20d
commit db711904fa

View File

@@ -515,6 +515,13 @@ class SearchFilter : public QSortFilterProxyModel
fileIndex = i;
}
}
// make sure changes are propogated upstream
connect(model, SIGNAL(modelReset()), this, SIGNAL(modelReset()));
connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SIGNAL(modelReset()));
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SIGNAL(modelReset()));
connect(model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), this, SIGNAL(modelReset()));
connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SIGNAL(modelReset()));
}
bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const {