Created attachment 115851 [details] screenshot STEPS TO REPRODUCE 1. open dolphin settings, click "Previews" tab in "General" section 2. check "Text files" previewer, click "ok" button 3. open some folder containing a flatpakref file OBSERVED RESULT flatpakref fle appears as text preview. See the screenshot. EXPECTED RESULT Dolphin should only show the file icon SOFTWARE VERSIONS Arch Linux KDE Plasma Version: 5.14.1 KDE Frameworks Version: 5.51 Qt Version: 5.12 beta2
Why? A flatpakref file is a text file (according to its mimetype definition in shared-mime-info).
It technically is but from a user's POV it's not. We explicitly ignore .desktop files (that are also technically text files) for that reason, perhaps we can do the same here. I'm not a fan of adding a blacklist of random mime types to the previewer, though :/
Submitted a patch: https://phabricator.kde.org/D22936
Git commit df85d47c7242aeb7b713de48049891628254a67d by Nate Graham. Committed on 08/08/2019 at 14:00. Pushed by ngraham into branch 'Applications/19.08'. [Text thumbnailer] Don't show text preview for .directory and .flatpakref files 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). Related: bug 410561 FIXED-IN: 19.08.0 Test Plan: {F7161776, size=full} Reviewers: #vdg, #frameworks, broulik Reviewed By: broulik Subscribers: kde-frameworks-devel, kfm-devel Tags: #dolphin, #frameworks Differential Revision: https://phabricator.kde.org/D22936 M +6 -2 thumbnail/textcreator.cpp https://commits.kde.org/kio-extras/df85d47c7242aeb7b713de48049891628254a67d