mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Refactor Filter
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
79b7e277f1
commit
d41db5253e
12 changed files with 50 additions and 111 deletions
|
|
@ -63,7 +63,7 @@ class VersionFilterModel : public QSortFilterProxyModel {
|
|||
for (auto it = filters.begin(); it != filters.end(); ++it) {
|
||||
auto data = sourceModel()->data(idx, it.key());
|
||||
auto match = data.toString();
|
||||
if (!it.value()->accepts(match)) {
|
||||
if (!it.value()(match)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -380,9 +380,9 @@ void VersionProxyModel::clearFilters()
|
|||
filterModel->filterChanged();
|
||||
}
|
||||
|
||||
void VersionProxyModel::setFilter(const BaseVersionList::ModelRoles column, Filter* f)
|
||||
void VersionProxyModel::setFilter(const BaseVersionList::ModelRoles column, Filter f)
|
||||
{
|
||||
m_filters[column].reset(f);
|
||||
m_filters[column] = std::move(f);
|
||||
filterModel->filterChanged();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue