Review Request 120909: in kio_smb: Set inode/directory mimetype for folders
Mark Gaiser
markg85 at gmail.com
Sat Nov 1 16:49:40 UTC 2014
> On okt 31, 2014, 8:52 a.m., David Faure wrote:
> > Hmm, not sure which change in KFileItem you're referring to. But maybe this is the change from KMimeType (which used a mode_t argument) to QMimeType (which doesn't). We could add some logic in KFileItem to preserve behavior compat for kioslaves if you want.
Just thinking out loud now..
KFileItem should know if an entry is a file or folder. It's being set in UDS_FILE_TYPE and used in the isDir() function of KFileItem. That being said, isn't the easiest fix for this to just add some logic to the iconName() function in KFileItem that does something like this:
if (isDir()) {
return "whatever-the-mime-type-of-a-folder-is";
}
?
- Mark
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120909/#review69572
-----------------------------------------------------------
On okt 30, 2014, 10:42 p.m., Àlex Fiestas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120909/
> -----------------------------------------------------------
>
> (Updated okt 30, 2014, 10:42 p.m.)
>
>
> Review request for KDE Frameworks and David Faure.
>
>
> Repository: kio-extras
>
>
> Description
> -------
>
> Set inode/directory mimetype for folders
>
>
> Diffs
> -----
>
> smb/kio_smb_browse.cpp 67e2fa0
>
> Diff: https://git.reviewboard.kde.org/r/120909/diff/
>
>
> Testing
> -------
>
> Previously (kde4) KFileItem was doing an extra effort into figuring out the miemtype for remotes url but now it is not (at least not by default).
>
> Since we already know that the item is a directory we can set the mimetype already, saving roundtrips and making samba kioslave show folder icons again (and faster since we save a stat).
>
> Would be nice if somebody from frameworks (kio) could confirm that the situation regarding mimetypes in frameworks have changed.
>
>
> Thanks,
>
> Àlex Fiestas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20141101/883869ac/attachment.html>
More information about the Kde-frameworks-devel
mailing list