Should fast mime detection use a stat call?

Frank Reininghaus frank78ac at
Mon Jun 17 19:44:31 BST 2013


2013/6/17 Mark:
> On Mon, Jun 17, 2013 at 4:13 PM, David Faure wrote:
>> Le lundi 17 juin 2013 09:54:02 Mark a écrit :
>>> However, that
>>> stat data isn't send to KMimeType so another way would be to require a
>>> "KFileItem" which knows more about a file instead of a KUrl (QUrl in
>>> kde frameworks). But then again, that requires app side changes...
>> No, just ensure that the calls to KMimeType that you're looking at, get the
>> mode_t from the KFileItem. I.e. don't change KMimeType itself (for that
>> particular issue), change the callers to provide more information, and get
>> more speed out of it. This way, other callers won't break.
> Will do so.
> @Frank, do you happen to know what dolphin does here? Is it passing
> this mode property?

Dolphin does not call KMimeType funcions directly. It just uses it
indirectly via KFileItem. If KMimeType does make superfluous stat
calls when being called indirectly from Dolphin (I don't know if that
is the case), then I think that this can only be fixed inside


More information about the kde-core-devel mailing list