mirror of
https://github.com/status-im/SortFilterProxyModel.git
synced 2025-02-17 21:37:42 +00:00
Fixes a bug where sorters wouldn't get cleared
This bug was exposed by commit 9a72c73226ce193c733513484ecf9292bce8601b Also fixes a cosmetic typo in a variable name
This commit is contained in:
parent
9a72c73226
commit
8fc7679ab8
@ -302,16 +302,16 @@ int QQmlSortFilterProxyModel::count_sorter(QQmlListProperty<Sorter>* list)
|
||||
return sorters->count();
|
||||
}
|
||||
|
||||
Sorter *QQmlSortFilterProxyModel::at_sorter(QQmlListProperty<Sorter>* list, int index)
|
||||
Sorter* QQmlSortFilterProxyModel::at_sorter(QQmlListProperty<Sorter>* list, int index)
|
||||
{
|
||||
auto filters = static_cast<QList<Sorter*>*>(list->data);
|
||||
return filters->at(index);
|
||||
auto sorters = static_cast<QList<Sorter*>*>(list->data);
|
||||
return sorters->at(index);
|
||||
}
|
||||
|
||||
void QQmlSortFilterProxyModel::clear_sorters(QQmlListProperty<Sorter>* list)
|
||||
{
|
||||
auto that = static_cast<QQmlSortFilterProxyModel*>(list->object);
|
||||
that->m_filters.clear();
|
||||
that->m_sorters.clear();
|
||||
that->invalidate();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user