Support font/ttf and font/otf mimetypes in kfontinst
ClosedPublic

Authored by fvogt on Jan 8 2018, 6:00 PM.

Details

Summary

Those mimetypes are new and kfontinst/kfontview/fontthumbnail weren't aware
of that.
As the old types are aliases of the new types, it doesn't need to be added
to the file dialog options (it would create duplicate entries).
However, it broke thumbnail generation.

Test Plan

.ttf files have thumbnails again.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
fvogt created this revision.Jan 8 2018, 6:00 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 8 2018, 6:00 PM
fvogt requested review of this revision.Jan 8 2018, 6:00 PM
anthonyfieroni added inline comments.
kcms/kfontinst/lib/Misc.cpp
293–294

So why not

return CFontList::fontMimeTypes.contains(mime);

In other places too.

fvogt added inline comments.Jan 8 2018, 6:36 PM
kcms/kfontinst/lib/Misc.cpp
293–294

It's probably not linked together.

Anyway, this is just supposed to be a simple fix and not a refactor, stuff like this is all over the place here...

broulik accepted this revision.Jan 10 2018, 9:39 AM
This revision is now accepted and ready to land.Jan 10 2018, 9:39 AM
This revision was automatically updated to reflect the committed changes.