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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On April 12th, 2013, 5:45 a.m. IST, <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/109817/diff/3/?file=137537#file137537line361" style="color: black; font-weight: bold; text-decoration: underline;">src/playlist/PlaylistModel.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </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; ">Playlist::Model::data( const QModelIndex& index, int role ) const</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">361</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="c1">//display tooltip even if s_showToolTip is false if track not playable</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">362</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">if</span><span class="p">(</span> <span class="o">!</span><span class="n">track</span><span class="o">-></span><span class="n">isPlayable</span><span class="p">()</span> <span class="p">)</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">363</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="k">return</span> <span class="n">i18n</span><span class="p">(</span> <span class="s">"%1</span><span class="se">\n</span><span class="s">%2"</span><span class="p">,</span> <span class="n">tooltipFor</span><span class="p">(</span> <span class="n">track</span> <span class="p">),</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">364</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                             <span class="n">track</span><span class="o">-></span><span class="n">prettyNotPlayableReason</span><span class="p">()</span> <span class="p">);</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">365</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">else</span> <span class="k">if</span><span class="p">(</span> <span class="n">s_showToolTip</span> <span class="p">)</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">366</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="k">return</span> <span class="n">tooltipFor</span><span class="p">(</span> <span class="n">track</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;">Thinking about it more, the logic should be following:

if( s_showToolTip )
    toolTipForTrack() // contains logic for showing not played notice if track isn't playable
else if( !track->notPlayebleReason().isEmpty() )
    return i18n( "<b>Note:</b> the track is not playable.\n%1", notPlayableReason );  // i.e. just show the notice if s_showToolTip is false</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;">Can't I just check if( !track->isPlayable() )?</pre>
<br />




<p>- Anmol</p>


<br />
<p>On April 13th, 2013, 7:08 p.m. IST, Anmol Ahuja 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 Anmol Ahuja.</div>


<p style="color: grey;"><i>Updated April 13, 2013, 7:08 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;">1. Added notPlayableReason() and prettyNotPlayableReason() to class Track
2. Display track tooltip with the prettyNotPlayableReason() if track not playable</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;">Works as expected</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/core-impl/collections/daap/DaapMeta.cpp <span style="color: grey">(e66afb7)</span></li>

 <li>src/core-impl/collections/daap/DaapMeta.h <span style="color: grey">(9a9c257)</span></li>

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

 <li>src/core-impl/collections/db/sql/SqlMeta.cpp <span style="color: grey">(19ec936)</span></li>

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

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

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

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

 <li>src/core-impl/collections/nepomukcollection/meta/NepomukTrack.h <span style="color: grey">(27ff06d)</span></li>

 <li>src/core-impl/collections/nepomukcollection/meta/NepomukTrack.cpp <span style="color: grey">(6d5bcf7)</span></li>

 <li>src/core-impl/collections/playdarcollection/PlaydarMeta.h <span style="color: grey">(7a39a4f)</span></li>

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

 <li>src/core-impl/collections/proxycollection/ProxyCollectionMeta.h <span style="color: grey">(ef342a4)</span></li>

 <li>src/core-impl/collections/proxycollection/ProxyCollectionMeta.cpp <span style="color: grey">(e58a20a)</span></li>

 <li>src/core-impl/collections/support/MemoryMeta.h <span style="color: grey">(40061d2)</span></li>

 <li>src/core-impl/collections/upnpcollection/UpnpMeta.h <span style="color: grey">(55bc131)</span></li>

 <li>src/core-impl/collections/upnpcollection/UpnpMeta.cpp <span style="color: grey">(00cc915)</span></li>

 <li>src/core-impl/meta/file/File.h <span style="color: grey">(7d3359d)</span></li>

 <li>src/core-impl/meta/file/File.cpp <span style="color: grey">(2cd0a61)</span></li>

 <li>src/core-impl/meta/multi/MultiTrack.h <span style="color: grey">(be55170)</span></li>

 <li>src/core-impl/meta/proxy/MetaProxy.h <span style="color: grey">(15967df)</span></li>

 <li>src/core-impl/meta/proxy/MetaProxy.cpp <span style="color: grey">(6a35bc5)</span></li>

 <li>src/core-impl/meta/stream/Stream.h <span style="color: grey">(3e19b45)</span></li>

 <li>src/core-impl/meta/stream/Stream.cpp <span style="color: grey">(6e35960)</span></li>

 <li>src/core/meta/Meta.h <span style="color: grey">(f86cf39)</span></li>

 <li>src/playlist/PlaylistModel.cpp <span style="color: grey">(246b9a1)</span></li>

 <li>src/services/ampache/AmpacheMeta.h <span style="color: grey">(934fe75)</span></li>

 <li>src/services/ampache/AmpacheMeta.cpp <span style="color: grey">(b59715c)</span></li>

 <li>src/services/lastfm/meta/LastFmMeta.h <span style="color: grey">(9c54a10)</span></li>

 <li>src/services/lastfm/meta/LastFmMeta.cpp <span style="color: grey">(424d136)</span></li>

</ul>

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







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








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