[MimeTypeUtils] Remove two invalid image mimeTypes
Needs ReviewPublic

Authored by ahmadsamir on Mar 5 2020, 3:07 PM.

Details

Reviewers
ngraham
Group Reviewers
Gwenview
Summary

image/x-nikon-nrw and image/x-samsung-srw are not valid mimeTypes according
to QMimeDatabase. See also https://phabricator.kde.org/D27865

Extend documenttest to check the mimetypes returned by MimeTypeUtils::imageMimeTypes().

Re-enable documentest and remove the redundant exiv2/exif.hpp #include
to fix the build, it seems it's not needed.

Test Plan

make && ctest, all of them pass except contextmanagertest, which is
unrelated AFAICS.

CCBUG: 417355

Diff Detail

Repository
R260 Gwenview
Branch
l-mimetypeutils (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23326
Build 23344: arc lint + arc unit
ahmadsamir created this revision.Mar 5 2020, 3:07 PM
Restricted Application added a project: Gwenview. · View Herald TranscriptMar 5 2020, 3:07 PM
ahmadsamir requested review of this revision.Mar 5 2020, 3:07 PM

Not being an expert in MIME types and camera RAW formats, is it possible that these MIMEtypes exist in the wind anyway despiye not being valid from the perspective of QMimeDatabase? We don't want to break any of our users.

bruns added a subscriber: bruns.Mar 19 2020, 1:25 AM

QMimeDatabase uses shared-mime-info.

The image/x-nikon-nrw type is missing from SMI, see also https://bugs.kde.org/show_bug.cgi?id=415951
Apparently the same for samsung-srw.

Both types are used by e.g. RawTherapee, and exist as distinct types.

Unfortunately SMI is very slow in picking up new entries ...

Thanks, so then it sounds like the real solution is to submit these types to shared-mime-info. I submitted a patch once, it wasn't hard. However I don't have any of these files or a means to create them, so I don't think I can be the one to do so.