]> cloud.milkyroute.net Git - dolphin.git/commit
Make determining the mime type faster for folders
authorFrank Reininghaus <frank78ac@googlemail.com>
Sat, 24 Aug 2013 18:22:56 +0000 (20:22 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sat, 24 Aug 2013 18:22:56 +0000 (20:22 +0200)
commit7ffa66f77789f754a4c35a5c4d0ecbfc0a0ae1e7
tree91dae1574805e549359e2333bcb4c346d1066a76
parentd7997f16a703990c1519bcf87806e44fb0ec73fa
Make determining the mime type faster for folders

KFileItem::determineMimeType() not only determines the mime type, but
also the icon. For folders, it looks for a .directory file inside the
folder, where a custom icon might be stored. This can take quite a bit
of time and cause the problem that some folder's type still appears to
be "unknown" when the view is shown.

We can work around this problem by caching the folder mime type in a
static QString and applying to to all folders, which can be identified
easily with KFileItem::isDir(),

BUG: 321710
FIXED-IN: 4.11.1
REVIEW: 111830
src/kitemviews/kfileitemmodel.cpp