[KSortFilterProxyModel QML] Make invalidateFilter public
ClosedPublic

Authored by broulik on Mar 22 2020, 10:19 AM.

Details

Summary

invalidate is, so I don't see why invalidateFilter wasn't.
This is tremendously useful when implementing custom filtering for e.g. a list view.

Test Plan
  • Unit test extended to cover this, passes

Diff Detail

Repository
R275 KItemModels
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Mar 22 2020, 10:19 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 22 2020, 10:19 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Mar 22 2020, 10:19 AM
davidedmundson accepted this revision.Mar 22 2020, 10:46 AM
This revision is now accepted and ready to land.Mar 22 2020, 10:46 AM
kmaterka accepted this revision.Mar 22 2020, 10:54 AM
src/qml/ksortfilterproxymodel.h
126

Could you add a line of docs that say this is relevant if you have a set filter callback, but not needed when just changing the properties

iasensio accepted this revision.Mar 22 2020, 2:20 PM

It's working nicely, thanks!

broulik updated this revision to Diff 78227.Mar 22 2020, 2:51 PM
  • Add docs
This revision was automatically updated to reflect the committed changes.