Do not add Type::Document/Presentation/Spreadsheet twice for MS Office docs
ClosedPublic

Authored by bruns on Nov 22 2018, 1:41 AM.

Details

Summary

The mimetype is matched with "powerpoint" and "excel" already, no need
to add it to the list a second time.
This has no influence on DB contents, as adding a term is idempotent, but
makes the QHash here and the returned QVector<Type> slightly smaller.

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Nov 22 2018, 1:41 AM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptNov 22 2018, 1:41 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Nov 22 2018, 1:41 AM
lbeltrame accepted this revision.Nov 22 2018, 6:38 AM
lbeltrame added a subscriber: lbeltrame.

LGTM; just a minor change needed.

src/file/basicindexingjob.cpp
153

Remove instead of committing commented out code?

This revision is now accepted and ready to land.Nov 22 2018, 6:38 AM
bruns marked an inline comment as done.Nov 22 2018, 7:16 PM
bruns added inline comments.
src/file/basicindexingjob.cpp
153

I prefer not to remove it, at least not completely. I think it is useful to have the mimetypes listed explicitly, so if someone greps for it it is obvious these are already covered.
probably:

// The pre-XML MS Office formats are already covered by the "contains" above:
// "application/vnd.ms-powerpoint"
// "application/vnd.ms-excel"
This revision was automatically updated to reflect the committed changes.
bruns marked an inline comment as done.