[Folder View Config] Make model writable and drop custom setRowChecked method
ClosedPublic

Authored by broulik on Jul 26 2017, 3:48 PM.

Details

Summary

By implementing setData we make the model magic property writable and can directly assign model.checked a new value.
Not only is this cleaner but it will just work with proxy models.

Test Plan

Changed some preview plugins, applied settings, preview plugins were loaded/unloaded as desired.
Changed some mimetype filters, applied settings, files showed up anddisappeared as desired.

(The FilterableMimeTypesModel can probably be removed and replaced by a Plasma SortFilterModel)

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jul 26 2017, 3:48 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 26 2017, 3:48 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik updated this revision to Diff 17242.Jul 26 2017, 3:52 PM

Emit checkedTypesChanged only when changed, I hoped model would be smart enough not to change if the value was the same but implicit assignment always ends up in setData

hein accepted this revision.Aug 2 2017, 8:36 AM
This revision is now accepted and ready to land.Aug 2 2017, 8:36 AM
This revision was automatically updated to reflect the committed changes.