<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/103014/">http://git.reviewboard.kde.org/r/103014/</a>
     </td>
    </tr>
   </table>
   <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/103014/diff/2/?file=40439#file40439line106" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/support/TextualQueryFilter.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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; ">Collections::addTextualFilter( Collections::QueryMaker *qm, const QString &filter )</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">106</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="c1">// </span><span class="cs">TODO</span><span class="c1">: Once we have MetaConstants.cpp use those functions here</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">106</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="k">if</span><span class="p">(</span> <span class="n">field</span> <span class="o">==</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valAlbum</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;">Good! Now this looks much more nicer.

But.. what about turing this into a switch..case now? This has additional benefit that compiler can warn about enum values not used in switch.

I forgot what convention is used in Amarok for indenting switches, but it is in HACKING/conding_styel..</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/103014/diff/2/?file=40440#file40440line65" style="color: black; font-weight: bold; text-decoration: underline;">src/core/meta/support/MetaConstants.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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; ">QString Meta::nameForField( qint64 field )</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">65</font></th>
    <td bgcolor="#fdfebc" 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">name</span> <span class="o">==</span> <span class="s">"filename"</span> <span class="p">)</span> <span class="k">return</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valUrl</span><span class="p">;</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">65</font></th>
    <td bgcolor="#fdfebc" 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">name</span><span class="p">.</span><span class="n">compare</span><span class="p">(</span> <span class="s">"filename"</span><span class="p">,</span> <span class="n">Qt</span><span class="o">::</span><span class="n">CaseInsensitive</span> <span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">||</span> <span class="n">name</span><span class="p">.</span><span class="n">compare</span><span class="p">(</span> <span class="n">shortI18nForField</span><span class="p">(</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valUrl</span> <span class="p">),</span> <span class="n">Qt</span><span class="o">::</span><span class="n">CaseInsensitive</span> <span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="p">)</span> <span class="k">return</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valUrl</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;">You may perhaps want to wrap all these entries not to be that long, suggestion:

else if( name.compare( "filename", Qt::CaseInsensitive ) == 0
      || name.compare( shortI18nForField( Meta::valUrl ), Qt::CaseInsensitive ) == 0 )
          return Meta::valUrl;</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/103014/diff/2/?file=40440#file40440line84" style="color: black; font-weight: bold; text-decoration: underline;">src/core/meta/support/MetaConstants.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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; ">QString Meta::nameForField( qint64 field )</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">84</font></th>
    <td bgcolor="#fdfebc" 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">name</span> <span class="o">==</span> <span class="s">"firstplay"</span> <span class="p">)</span> <span class="k">return</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valFirstPlayed</span><span class="p">;</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">84</font></th>
    <td bgcolor="#fdfebc" 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">name</span><span class="p">.</span><span class="n">compare</span><span class="p">(</span> <span class="s">"firstplay"</span><span class="p">,</span> <span class="n">Qt</span><span class="o">::</span><span class="n">CaseInsensitive</span> <span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">||</span> <span class="n">name</span><span class="p">.</span><span class="n">compare</span><span class="p">(</span> <span class="n">shortI18nForField</span><span class="p">(</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valFirstPlayed</span> <span class="p">),</span> <span class="n">Qt</span><span class="o">::</span><span class="n">CaseInsensitive</span> <span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="p">)</span> <span class="k">return</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valFirstPlayed</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;">Please accept also "first" as a special case - some users may have memorised it and now it would'n work for them.</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/103014/diff/2/?file=40440#file40440line85" style="color: black; font-weight: bold; text-decoration: underline;">src/core/meta/support/MetaConstants.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 2)

    </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; ">QString Meta::nameForField( qint64 field )</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">85</font></th>
    <td bgcolor="#fdfebc" 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">name</span> <span class="o">==</span> <span class="s">"lastplay"</span> <span class="p">)</span> <span class="k">return</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valLastPlayed</span><span class="p">;</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">85</font></th>
    <td bgcolor="#fdfebc" 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">name</span><span class="p">.</span><span class="n">compare</span><span class="p">(</span> <span class="s">"lastplay"</span><span class="p">,</span> <span class="n">Qt</span><span class="o">::</span><span class="n">CaseInsensitive</span> <span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">||</span> <span class="n">name</span><span class="p">.</span><span class="n">compare</span><span class="p">(</span> <span class="n">shortI18nForField</span><span class="p">(</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valLastPlayed</span> <span class="p">),</span> <span class="n">Qt</span><span class="o">::</span><span class="n">CaseInsensitive</span> <span class="p">)</span> <span class="o">==</span> <span class="mi">0</span> <span class="p">)</span> <span class="k">return</span> <span class="n">Meta</span><span class="o">::</span><span class="n">valLastPlayed</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;">Please also accept "played" as a special case to be backward-compatible.</pre>
</div>
<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;">Good work, Daniel! Please fix remaining minor fix and I'll be happy to merge this. (or, do you have commit access yourself?)</pre>

<p>- MatÄ›j</p>


<br />
<p>On November 6th, 2011, 5:45 p.m., Daniel Faust 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 Daniel Faust.</div>


<p style="color: grey;"><i>Updated Nov. 6, 2011, 5:45 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 filters (eg. filesize, artist) can be translated but without this patch components like the EditFilterDialog won't recognize the keywords.

I haven't committed it yet because it also changes the keyword 'modifydate' to 'modified' since i think that that's a bug, too.</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/support/TextualQueryFilter.cpp <span style="color: grey">(2a44a30)</span></li>

 <li>src/core/meta/support/MetaConstants.cpp <span style="color: grey">(fabb146)</span></li>

</ul>

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




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








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