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





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The resolver failed to download for me. Got an QNetworkReply::UnknownNetworkError, but normally the binary would not have been saved correctly either.</pre>
 <br />





<div>




<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/105285/diff/3/?file=77309#file77309line122" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/spotifycollection/SpotifyCollection.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">namespace Collections</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">122</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="n">error</span> <span class="o">==</span> <span class="n">Spotify</span><span class="o">::</span><span class="n">Controller</span><span class="o">::</span><span class="n">ErrorState</span><span class="p">(</span> <span class="mi">1</span> <span class="p">)</span> <span class="p">)</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Use the enum value here. I assume this has to be ResolverNotFound</pre>
</div>
<br />

<div>




<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/105285/diff/3/?file=77309#file77309line149" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/spotifycollection/SpotifyCollection.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">namespace Collections</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">149</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">m_configureAction</span> <span class="o">=</span> <span class="k">new</span> <span class="n">QAction</span><span class="p">(</span> <span class="n">KIcon</span><span class="p">(</span> <span class="s">"configure"</span> <span class="p">),</span> <span class="n">i18n</span><span class="p">(</span> <span class="s">"&Configure Spotify collection"</span> <span class="p">),</span> <span class="k">this</span> <span class="p">);</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">QAction is a QObject so could be parented to SpotifyCollection to be automatically deleted. Saves you some manual memory management.</pre>
</div>
<br />

<div>




<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/105285/diff/3/?file=77310#file77310line45" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/spotifycollection/SpotifyConfig.h</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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">public:</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">45</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">const</span> <span class="n">QByteArray</span> <span class="n">apikey</span><span class="p">()</span> <span class="k">const</span> <span class="p">{</span> <span class="k">return</span> <span class="n">m_apikey</span><span class="p">;</span> <span class="p">}</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">API key is locked away in the resolver binary like intended. Remove these functions to avoid confusion.</pre>
</div>
<br />

<div>




<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/105285/diff/3/?file=77311#file77311line32" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/spotifycollection/SpotifyConfig.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">SpotifyConfig::SpotifyConfig()</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">32</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="p">,</span> <span class="n">m_resolverPath</span> <span class="p">()</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">resolverPath does not have a default value and is never set except from kwallet/configfile. What is those are empty?
It causes a failure to download in Settings.</pre>
</div>
<br />

<div>




<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/105285/diff/3/?file=77311#file77311line72" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/spotifycollection/SpotifyConfig.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">SpotifyConfig::SpotifyConfig()</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">72</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="n">m_wallet</span><span class="o">-></span><span class="n">readEntry</span><span class="p">(</span> <span class="s">"spotify_resolver"</span><span class="p">,</span> <span class="n">resolverPath</span> <span class="p">)</span> <span class="o">></span> <span class="mi">0</span> <span class="p">)</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Does it make sense to store this in the wallet? Doesn't look like sensitive info to me.</pre>
</div>
<br />

<div>




<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/105285/diff/3/?file=77322#file77322line205" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/spotifycollection/SpotifySettings.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">SpotifySettings::slotDownloadFinished()</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">205</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You need to check QNetworkReply::error() == NoError before continuing.  In case of download error the write will still be attempted.</pre>
</div>
<br />



<p>- Bart</p>


<br />
<p>On August 13th, 2012, 11:24 a.m., Zhengliang Feng wrote:</p>






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

<div>Review request for Amarok.</div>
<div>By Zhengliang Feng.</div>


<p style="color: grey;"><i>Updated Aug. 13, 2012, 11:24 a.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;">Things I've done this week:
* Added a new playlist provider SpotifyPlaylistProvider
* Added playlist class SpotifyPlaylist
* Clear all extra whitespaces
* Figured out how Collection, QueryMaker and Playlist worked

Things need to be done next week:
* Clean ScriptResolver's interfaces, move all query related interfaces into Query class
* Replace Controller class with ScriptResolver
* Test SpotifyCollection
* Finish playlist and playlist provider</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;">No test done this week. </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/CMakeLists.txt <span style="color: grey">(c78b920)</span></li>

 <li>src/core-impl/collections/spotifycollection/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyCollection.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyCollection.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyConfig.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyConfig.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyConfigWidget.ui <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyMeta.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyMeta.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyPlaylist.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyPlaylist.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyPlaylistProvider.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyQueryMaker.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifyQueryMaker.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifySettings.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/SpotifySettings.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/amarok_collection-spotifycollection.desktop <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/support/Controller.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/support/Controller.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/support/QMFunctionTypes.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/support/Query.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/support/Query.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/support/TrackProxy.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/core-impl/collections/spotifycollection/support/TrackProxy.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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




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








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