mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-10-15 06:51:07 -04:00
moved calls to setDynamicSortFilter(false) into constructors of sort proxy models
This commit is contained in:
parent
95e1073b8a
commit
d4141c493d
5 changed files with 21 additions and 14 deletions
|
@ -206,7 +206,10 @@ public:
|
|||
class ForumPostSortFilterProxyModel: public QSortFilterProxyModel
|
||||
{
|
||||
public:
|
||||
explicit ForumPostSortFilterProxyModel(const QHeaderView *header,QObject *parent = NULL): QSortFilterProxyModel(parent),m_header(header) {}
|
||||
explicit ForumPostSortFilterProxyModel(const QHeaderView *header,QObject *parent = NULL): QSortFilterProxyModel(parent),m_header(header)
|
||||
{
|
||||
setDynamicSortFilter(false); // causes crashes when true
|
||||
}
|
||||
|
||||
bool lessThan(const QModelIndex& left, const QModelIndex& right) const override
|
||||
{
|
||||
|
@ -257,7 +260,6 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
|||
mThreadModel = new RsGxsForumModel(this);
|
||||
mThreadProxyModel = new ForumPostSortFilterProxyModel(ui->threadTreeWidget->header(),this);
|
||||
mThreadProxyModel->setSourceModel(mThreadModel);
|
||||
mThreadProxyModel->setDynamicSortFilter(false); // causes crashes when true.
|
||||
mThreadProxyModel->setSortRole(RsGxsForumModel::SortRole);
|
||||
ui->threadTreeWidget->setModel(mThreadProxyModel);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue