Remove mime type <-> extension cache

Authored by brauch on Oct 12 2016, 9:02 PM.

Description

Remove mime type <-> extension cache

The idea that because one file with extension X has mime type A,
determined by its contents, hence other files with extension X will
have the same mime type is just wrong. One common example where this
breaks in a spectacular way is CMakeLists.txt and the .txt extension.

I found the claim that looking into each file will make the application
unresponsive to be unfounded. QMimeType will only read the first 16kB to
guess the mime type, which takes less than a millisecond for each file.
A test project with three hundred 3 MB binary blobs still loads instantly.
If, in comparison, we parse one of the files as CMake erraneously, we
take multiple seconds.

CCBUG:363269
Differential Revision: https://phabricator.kde.org/D3042

Details

Committed
brauchOct 13 2016, 6:52 PM
Differential Revision
D3042: Remove mime type <-> extension cache
Parents
R32:9b98333bef68: Commit missing changes from merge 21d0a97
Branches
Unknown
Tags
Unknown