<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/112982/">http://git.reviewboard.kde.org/r/112982/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 22nd, 2013, 8:08 a.m. UTC, <b>David Faure</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/112982/diff/2/?file=193087#file193087line45" style="color: black; font-weight: bold; text-decoration: underline;">kioslave/smb/kio_smb_dir.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">37</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c1">// </span><span class="cs">TODO</span><span class="c1">: add when libsmbclient supports it</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">45</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c1">// </span><span class="cs">TODO</span><span class="c1">: add when libsmbclient supports it</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">this TODO can be removed now, right?</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes it can, but only as soon as I implement the other half, copyFromFile.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 22nd, 2013, 8:08 a.m. UTC, <b>David Faure</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/112982/diff/2/?file=193087#file193087line285" style="color: black; font-weight: bold; text-decoration: underline;">kioslave/smb/kio_smb_dir.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">249</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">perms</span> <span class="o">=</span> <span class="k">static_cast</span><span class="o"><</span><span class="n">QFile</span><span class="o">::</span><span class="n">Permissions</span><span class="o">></span><span class="p">(</span><span class="n">permissions</span><span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm pretty sure this cast is wrong. QFile::Permissions doesn't map to mode_t, at least not with a simple cast.

Either do like kio_ftp does (KDE::open() instead of QFile), or add a call to chmod() at the end of the operation, or use a function to convert from mode_t to QFile::Permissions (maybe we want to have that in KFileItem, in fact).

I prefer solution 2 or 3 above solution 1, so that QFile can be used as much as possible.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Well you are probably right that it is a bad idea to do the cast here since everything does not perfectly map from mode_t to QFile::Permissions. However, at least the rwx permissions match exactly:

S_IRUSR 00400   owner has read permission
S_IWUSR 00200   owner has write permission
S_IXUSR 00100   owner has execute permission

S_IRGRP 00040   group has read permission
S_IWGRP 00020   group has write permission
S_IXGRP 00010   group has execute permission

S_IROTH 00004   others have read permission
S_IWOTH 00002   others have write permission
S_IXOTH 00001   others have execute permission


QFile::ReadUser    0x0400       The file is readable by the user.
QFile::WriteUser          0x0200        The file is writable by the user.
QFile::ExeUser      0x0100      The file is executable by the user.

QFile::ReadGroup          0x0040        The file is readable by the group.
QFile::WriteGroup        0x0020 The file is writable by the group.
QFile::ExeGroup    0x0010       The file is executable by the group.

QFile::ReadOther          0x0004        The file is readable by anyone.
QFile::WriteOther        0x0002 The file is writable by anyone.
QFile::ExeOther    0x0001       The file is executable by anyone.


Anyhow, I will see what I can do about finding a solution for this. However, I am confused why you would want it in KFileItem since that class is not even used in this particular code base. Should not something like that be added in a more convenience place? Perhaps kio/global.*?</pre>
<br />




<p>- Dawit</p>


<br />
<p>On October 5th, 2013, 3:07 p.m. UTC, Dawit Alemayehu wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDE Runtime.</div>
<div>By Dawit Alemayehu.</div>


<p style="color: grey;"><i>Updated Oct. 5, 2013, 3:07 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=176271">176271</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=291835">291835</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-runtime
</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;">The attach patch adds support for the following to kio_smb:

- copyToFile optimization so downloading files from window shares is faster.
- partial download resumption as part of the copyToFile implementation.
- preservation of modified file timstamp. Again as part of the copyToFile implementation.

Note that in this patch the latter two features only apply to "smb" -> "file" downloads. The second part of this patch will that will follow soon will add support for the other half, the "copyFromFile" optimization.</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>kioslave/smb/kio_smb.h <span style="color: grey">(55efb44)</span></li>

 <li>kioslave/smb/kio_smb_dir.cpp <span style="color: grey">(5573266)</span></li>

 <li>kioslave/smb/smb.protocol <span style="color: grey">(654bcfb)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/112982/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>