Fix crash in writer collection and cleanup

Authored by astippich on Oct 6 2019, 12:56 PM.

Description

Fix crash in writer collection and cleanup

Summary:
WriterCollection was apparently never used.
It crashed upon destruction due to bogus
deletion of the writer plugins.
This carries over some code of the
ExtractorCollection and cleans up a little
bit along the way. Adds a simple test.

Reviewers: bruns, mgallien, ngraham

Reviewed By: bruns

Subscribers: apol, kde-frameworks-devel, Baloo

Tags: Frameworks, Baloo

Differential Revision: https://phabricator.kde.org/D23411

Details