<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/112023/">http://git.reviewboard.kde.org/r/112023/</a>
     </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On August 12th, 2013, 4:57 p.m. UTC, <b>Matěj Laitl</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/112023/diff/1/?file=178093#file178093line125" style="color: black; font-weight: bold; text-decoration: underline;">src/core/collections/Collection.h</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">namespace Collections</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">125</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="cm">/**</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">125</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="cm">/**</span></pre></td>
  </tr>

 </tbody>


 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">126</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             * Return true if this collection can be written to (tracks added, removed).</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">126</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             * Return true if this collection can <span class="hl">actually </span>be written to (tracks added, removed).</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">127</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             * Convenience short-cut for calling CollectionLocation's isWritable.</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">127</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             * Convenience short-cut for calling CollectionLocation's isWritable.<span class="hl"> A collection</span></span></pre></td>
  </tr>

 </tbody>


 
 

 <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">128</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             * might be of a writeable type in principle but be in read-only mode for some reason.</span></pre></td>
  </tr>

 </tbody>


 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">128</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             */</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">129</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             */</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">129</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">virtual</span> <span class="kt">bool</span> <span class="n">isWritable</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">130</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">virtual</span> <span class="kt">bool</span> <span class="n">isWritable</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">130</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">131</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
  </tr>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">131</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="cm">/**</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">132</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="cm">/**</span></pre></td>
  </tr>

 </tbody>


 
 

 <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">133</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             * Return true if this type of collection can be written in principle.</span></pre></td>
  </tr>

  <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">134</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">             */</span></pre></td>
  </tr>

  <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">135</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">virtual</span> <span class="kt">bool</span> <span class="n">isWriteableType</span><span class="p">()</span> <span class="k">const</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;">Hmm, I don't like the combination of 2 bools to signify 3 possible values (because you introduce one invalid combination).

What about making it:
Enum WritableType {
    Writable,
    TemporarilyNotWritable,
    NotWritable // permanently
}
WritableType writableType() const;</pre>
 </blockquote>



 <p>On August 12th, 2013, 6:45 p.m. UTC, <b>Frank Meerkoetter</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;">Sure, i'll update the patch</pre>
 </blockquote>





 <p>On August 17th, 2013, 10:02 a.m. UTC, <b>Frank Meerkoetter</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;">I have a question about your proposal.

Your intention is to replace isWriteable() and isWriteableType() with writeableType() which returns an enum?</pre>
 </blockquote>





 <p>On August 17th, 2013, 11:05 a.m. UTC, <b>Matěj Laitl</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;">Yes, exactly. It might be a good idea to change it also in CollectionLocation so that Collection::writableType() remains just a convenience shortcut.</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;">Hi, did you see my updated patch?</pre>
<br />




<p>- Frank</p>


<br />
<p>On August 25th, 2013, 9:09 p.m. UTC, Frank Meerkoetter 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 Amarok.</div>
<div>By Frank Meerkoetter.</div>


<p style="color: grey;"><i>Updated Aug. 25, 2013, 9:09 p.m.</i></p>






<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 fix in https://git.reviewboard.kde.org/r/111991/ fixes isWriteable() for UMS collections. This has the effect that if an UMS-collection is actually non-writeable the copy/move operations will be missing from the TreeView/Filebrowser context menus. There is no clue to the user what is going on.

This patch is introducing a new method to the Collection interface so we can differentiate between collections that are non-writeable by principle and collections that just happen to be non-writeable right now (for what ever reason).

I use this changed collection interface to disable move/copy actions (as opposed to hide) for non-writeable UMS-colllections. This should give the user at least a hint what is going on.

Unfortunately i haven't found a way to display a tooltip ("Currently readonly"). The action is offering an setTooltip() method but now effect was observed.
</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;">I have tested with an USB-stick that is writeable and another one that is non-writeable. I have also observed that for the FileBrowser the "Local collection" is still shown as active.
 </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>src/browsers/CollectionTreeItemModel.cpp <span style="color: grey">(1ac4463)</span></li>

 <li>src/browsers/CollectionTreeView.cpp <span style="color: grey">(6fad164)</span></li>

 <li>src/browsers/filebrowser/FileView.cpp <span style="color: grey">(ad200eb)</span></li>

 <li>src/core-impl/collections/db/sql/SqlCollectionLocation.h <span style="color: grey">(da1b2e5)</span></li>

 <li>src/core-impl/collections/db/sql/SqlCollectionLocation.cpp <span style="color: grey">(3b55f66)</span></li>

 <li>src/core-impl/collections/ipodcollection/IpodCollection.h <span style="color: grey">(14fdd40)</span></li>

 <li>src/core-impl/collections/ipodcollection/IpodCollection.cpp <span style="color: grey">(36738d7)</span></li>

 <li>src/core-impl/collections/ipodcollection/IpodCollectionLocation.h <span style="color: grey">(cc27e19)</span></li>

 <li>src/core-impl/collections/ipodcollection/IpodCollectionLocation.cpp <span style="color: grey">(f8105f9)</span></li>

 <li>src/core-impl/collections/ipodcollection/IpodMeta.cpp <span style="color: grey">(6beca0a)</span></li>

 <li>src/core-impl/collections/ipodcollection/IpodPlaylist.cpp <span style="color: grey">(61c60ba)</span></li>

 <li>src/core-impl/collections/ipodcollection/IpodPlaylistProvider.cpp <span style="color: grey">(dcef4c2)</span></li>

 <li>src/core-impl/collections/mediadevicecollection/MediaDeviceCollectionLocation.h <span style="color: grey">(e40529f)</span></li>

 <li>src/core-impl/collections/mediadevicecollection/MediaDeviceCollectionLocation.cpp <span style="color: grey">(603ceff)</span></li>

 <li>src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.cpp <span style="color: grey">(4a419d5)</span></li>

 <li>src/core-impl/collections/nepomukcollection/NepomukCollection.h <span style="color: grey">(c5d7a13)</span></li>

 <li>src/core-impl/collections/nepomukcollection/NepomukCollection.cpp <span style="color: grey">(77aef8e)</span></li>

 <li>src/core-impl/collections/playdarcollection/PlaydarCollection.h <span style="color: grey">(1a7ec89)</span></li>

 <li>src/core-impl/collections/playdarcollection/PlaydarCollection.cpp <span style="color: grey">(5c2349d)</span></li>

 <li>src/core-impl/collections/support/FileCollectionLocation.h <span style="color: grey">(9bd303e)</span></li>

 <li>src/core-impl/collections/support/FileCollectionLocation.cpp <span style="color: grey">(4b9b4b0)</span></li>

 <li>src/core-impl/collections/support/TrashCollectionLocation.h <span style="color: grey">(239a977)</span></li>

 <li>src/core-impl/collections/support/TrashCollectionLocation.cpp <span style="color: grey">(61c2e49)</span></li>

 <li>src/core-impl/collections/umscollection/UmsCollection.cpp <span style="color: grey">(a73fd34)</span></li>

 <li>src/core-impl/collections/umscollection/UmsCollectionLocation.h <span style="color: grey">(6cfe4df)</span></li>

 <li>src/core-impl/collections/umscollection/UmsCollectionLocation.cpp <span style="color: grey">(cef90d7)</span></li>

 <li>src/core/collections/Collection.h <span style="color: grey">(94d24d7)</span></li>

 <li>src/core/collections/Collection.cpp <span style="color: grey">(01a2e8c)</span></li>

 <li>src/core/collections/CollectionLocation.h <span style="color: grey">(7a1ed1e)</span></li>

 <li>src/core/collections/CollectionLocation.cpp <span style="color: grey">(2385570)</span></li>

 <li>src/services/ServiceCollectionLocation.h <span style="color: grey">(cea3b84)</span></li>

 <li>src/services/ServiceCollectionLocation.cpp <span style="color: grey">(d1cb0d8)</span></li>

 <li>src/services/mp3tunes/Mp3tunesService.cpp <span style="color: grey">(ed2b006)</span></li>

 <li>src/services/mp3tunes/Mp3tunesServiceCollectionLocation.h <span style="color: grey">(2b06cb4)</span></li>

 <li>src/services/mp3tunes/Mp3tunesServiceCollectionLocation.cpp <span style="color: grey">(6aaa66d)</span></li>

 <li>src/synchronization/MasterSlaveSynchronizationJob.cpp <span style="color: grey">(1979701)</span></li>

 <li>src/synchronization/OneWaySynchronizationJob.cpp <span style="color: grey">(99f504c)</span></li>

 <li>src/synchronization/UnionJob.cpp <span style="color: grey">(8602044)</span></li>

 <li>tests/core-impl/collections/db/sql/TestSqlCollectionLocation.cpp <span style="color: grey">(ab41db3)</span></li>

 <li>tests/core/collections/CollectionLocationTest.cpp <span style="color: grey">(720fa6a)</span></li>

 <li>tests/core/collections/TestCollection.cpp <span style="color: grey">(72a8b3b)</span></li>

 <li>tests/synchronization/TestMasterSlaveSynchronizationJob.cpp <span style="color: grey">(b8b59c4)</span></li>

 <li>tests/synchronization/TestOneWaySynchronizationJob.cpp <span style="color: grey">(ce7a2b5)</span></li>

 <li>tests/synchronization/TestUnionJob.cpp <span style="color: grey">(2343577)</span></li>

</ul>

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







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








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