[Text thumbnailer] Don't show text preview for .directory and .flatpakref files
ClosedPublic

Authored by ngraham on Aug 4 2019, 11:42 PM.

Details

Summary

The text thumbnailer currently excludes .directory files from receiving text file
thumbnails, but does not do the same for .directory and .flatpakref files which are
the same things (actually text files that don't look, feel, or behave like text files).

This patch extends the same logic to those types of files as well, making them not
receive text previews and instead show their base mimetype or icon (if defined in the
file).

BUG: 410561
BUG: 400201
FIXED-IN: 19.08.0

Test Plan

Diff Detail

Repository
R320 KIO Extras
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.Aug 4 2019, 11:42 PM
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptAug 4 2019, 11:42 PM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
ngraham requested review of this revision.Aug 4 2019, 11:42 PM
broulik accepted this revision.Aug 8 2019, 1:59 PM

I think I would prefer a mime type check over a endsWith(.flatpakref) but that would introduce some overhead, so I guess this is fine.

This revision is now accepted and ready to land.Aug 8 2019, 1:59 PM
This revision was automatically updated to reflect the committed changes.