filenamesearch: use mime type inheritance to find out if a file contains plain text that can be searched

Review Request #116805 - Created March 15, 2014 and submitted

Information
Frank Reininghaus
kde-baseapps
KDE/4.12
332143
Reviewers
dolphin
When searching "by content", we only search in files whose mime type starts with "text/", to prevent that much time is wasted reading binary files, in which searching makes no sense.

Unfortunately, this prevents that shell scripts are being searched.

I propose to use mime type inheritance instead, and include all mime types in the search which inherit from "text/plain":

http://api.kde.org/4.12-api/kdelibs-apidocs/kdecore/html/classKMimeType.html#a0ca33f89a8381dd331c23cda15294da1
Shell scripts are now found when searching "by content".
Emmanuel Pescosta
Commit Hook
This review has been submitted with commit c52ba9446b05e6bc7f890daac406659a9c37c562 by Frank Reininghaus to branch KDE/4.12.
Frank Reininghaus
Review request changed

Status: Closed (submitted)

Loading...