<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 14th, 2013, 12:30 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/109817/diff/4/?file=138512#file138512line77" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/daap/DaapMeta.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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; ">DaapTrack::prettyUrl() const</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">77</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">bool</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">77</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">bool</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">78</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">DaapTrack</span><span class="o">::</span><span class="n">isPlayable</span><span class="p">()</span> <span class="k">const</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">78</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">DaapTrack</span><span class="o">::</span><span class="n">isPlayable</span><span class="p">()</span> <span class="k">const</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">79</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><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">79</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="p">{</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">80</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="c1">//daap tracks are accessed over the network, so check if network connectivity is present</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">80</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="c1">//daap tracks are accessed over the network, so check if network connectivity is present</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">81</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span><span class="p">(</span> <span class="n">Solid</span><span class="o">::</span><span class="n">Networking</span><span class="o">::</span><span class="n">status</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Solid</span><span class="o">::</span><span class="n">Networking</span><span class="o">::</span><span class="n">Connected</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">81</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span><span class="p">(</span> <span class="n">Solid</span><span class="o">::</span><span class="n">Networking</span><span class="o">::</span><span class="n">status</span><span class="p">()</span> <span class="o">!=</span> <span class="n">Solid</span><span class="o">::</span><span class="n">Networking</span><span class="o">::</span><span class="n">Connected</span> <span class="p">)</span></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">82</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="nb">false</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">82</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="nb">false</span><span class="p">;</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">83</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">83</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">84</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="nb">true</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">84</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="nb">true</span><span class="p">;</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">85</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><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">85</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><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;">Please remove this now redundant method - the base implementation + custom notPlayableReason() will suffice now.</pre>
</blockquote>
<p>On April 15th, 2013, 2:13 p.m. UTC, <b>Anmol Ahuja</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;">But wouldn't that lead to a lot of unnecessary overhead, when there are several unplayable tracks? Each call to isPlayable() will generate a non-empty QString, malloc calls and all.
PS: I'll get to work on this and the other patch [ and hopefully get down to discussing my GSoC proposal :) ] on Wednesday, exams again.</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;">> But wouldn't that lead to a lot of unnecessary overhead, when there are several unplayable tracks? Each call to isPlayable() will generate a non-empty QString, malloc calls and all.
A bit of overhead: yes, but I think we can assume QString creation and i18n() calls are already well-optimized. However, this is only a tiny bit of time spent in the function - the Solid::Networking::status() call (which may result in DBus method call) is already orders of magnitude slower than QString handling. Same applied for methods that check the filesystem for existence/type/permissions..
> PS: I'll get to work on this and the other patch [ and hopefully get down to discussing my GSoC proposal :) ] on Wednesday, exams again.
No problem, amount of patches you've submitted is already amazing. Good luck with your exams.</pre>
<br />
<p>- Matěj</p>
<br />
<p>On April 13th, 2013, 1:38 p.m. UTC, 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, 1:38 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>