React to config updates inside indexer
Summary:
In case a config was changed, we need to:
- Stop the ContentIndexer (bug 373430)
- Remove all scheduled indexing of files that should not be indexed
- Check for stale index entries. Those includes documents marked for indexing, that should be removed
(because of that we need to do it inside scheduleIndexing before content indexing)
- Finally, check for unindexed files (if new files were added)
(based on D15939: Perform checks for unindexed files and stale index entries on startup). Also note that IndexCleaner should clean all files, not just those inside includeFolders
BUG: 373430
Test Plan:
Seems to be working. But it would be nice to test it more.
- Add large folder to config. baloo_file start indexing it.
- Add it to exclude list. baloo_file stops indexing it, and removes entries from DB.
- Remove it from exclude list. baloo_file starts indexing it again.
Reviewers: Baloo, Frameworks, bruns, ngraham
Reviewed By: Baloo, ngraham
Subscribers: kde-frameworks-devel, bruns
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D15983