[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: Review Request 120909: in kio_smb: Set inode/directory mimetype for folders
From: "Mark Gaiser" <markg85 () gmail ! com>
Date: 2014-11-01 16:49:40
Message-ID: 20141101164940.4239.50452 () probe ! kde ! org
[Download RAW message or body]
--===============2653614319803980525==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
> 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
>
>
--===============2653614319803980525==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/120909/">https://git.reviewboard.kde.org/r/120909/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On oktober 31st, 2014, 8:52 a.m. UTC, <b>David \
Faure</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p></pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Just \
thinking out loud now..</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">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:</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">if (isDir()) { return "whatever-the-mime-type-of-a-folder-is";
}</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">?</p></pre> <br />
<p>- Mark</p>
<br />
<p>On oktober 30th, 2014, 10:42 p.m. UTC, Àlex Fiestas wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for KDE Frameworks and David Faure.</div>
<div>By Àlex Fiestas.</div>
<p style="color: grey;"><i>Updated okt 30, 2014, 10:42 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kio-extras
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Set inode/directory mimetype for folders</p></pre> \
</td> </tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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).</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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).</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Would \
be nice if somebody from frameworks (kio) could confirm that the situation regarding \
mimetypes in frameworks have changed.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>smb/kio_smb_browse.cpp <span style="color: grey">(67e2fa0)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/120909/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============2653614319803980525==--
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic