Open again children of supported mimetypes
ClosedPublic

Authored by elvisangelaccio on May 31 2016, 9:44 AM.

Details

Summary

After we moved from KMimeTypeTrader to KPluginLoader (in 16.04), we lost the ability to open mimetypes that are not directly registered with Ark, but are children of mimetypes supported by Ark.
For example the mimetypes of .odt and .epub files are not hardcoded in Ark (while application/x-java-archive is), yet they are children of application/zip and can be opened by our zip plugins.

BUG: 363717
FIXED-IN: 16.04.2

Test Plan

Ark can open again odt or epub files.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio retitled this revision from to Open again children of supported mimetypes.
elvisangelaccio updated this object.
elvisangelaccio edited the test plan for this revision. (Show Details)
elvisangelaccio added a reviewer: rthomsen.
elvisangelaccio set the repository for this revision to R36 Ark.
elvisangelaccio added a project: Ark.
elvisangelaccio added a subscriber: kde-utils-devel.
rthomsen requested changes to this revision.Jun 5 2016, 8:30 AM
rthomsen edited edge metadata.

See inline comment.

kerfuffle/archive_kerfuffle.cpp
71–75

Instead of iterating over the parent mimetypes, you can iterate over metaData.mimeTypes() and then use QMimeType::inherits() to check if mimeType inherits each of those. The result should be the same, but the code might be easier to understand?

This revision now requires changes to proceed.Jun 5 2016, 8:30 AM
elvisangelaccio edited edge metadata.

Check whether a mimetype inherits from a supported mimetype (instead of the other way around)

elvisangelaccio marked an inline comment as done.Jun 5 2016, 6:09 PM
rthomsen accepted this revision.Jun 5 2016, 6:10 PM
rthomsen edited edge metadata.

Ship it! :)

This revision is now accepted and ready to land.Jun 5 2016, 6:10 PM