<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://svn.reviewboard.kde.org/r/5671/">http://svn.reviewboard.kde.org/r/5671/</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;">You're too fast :-)  Added some comments to r2 on the Date stuff.  I'll add some new api to KCalendarSystem to make your life easier.</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39910#file39910line68" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/datefacet.h</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="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 Nepomuk {</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">68</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="n">None</span> <span class="o">=</span> <span class="mh">0x0</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;">Isn't None a bit too generic?  Perhaps NoDateRange?</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39911#file39911line165" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/datefacet.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="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; ">DateRange Nepomuk::Utils::DateFacet::Private::dateRangeCandidateToDateRange( DateRangeCandidate range ) 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">165</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">DateRange</span><span class="o">::</span><span class="n">weekOf</span><span class="p">(</span><span class="n">today</span><span class="p">.</span><span class="n">addDays</span><span class="p">(</span><span class="o">-</span><span class="mi">7</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;">Shouldn't assume 7 days in a week, use calendar()->daysInWeek(date) instead</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39911#file39911line183" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/datefacet.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="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; ">DateRange Nepomuk::Utils::DateFacet::Private::dateRangeCandidateToDateRange( DateRangeCandidate range ) 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">183</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                          <span class="n">QDate</span><span class="p">(</span> <span class="n">today</span><span class="p">.</span><span class="n">year</span><span class="p">()</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">12</span><span class="p">,</span> <span class="mi">31</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;">Already here :-)  Yes, the first / last days of the year will need localizing, but it's not pretty.  In fact, it's so ugly, I'll add some public convenience methods to KCalendarSystem for them instead as it's easy to get t wrong (I already have private ones).  I'll get that done this weekend, If not ready in time free free to commit and I'll clean up afterward :-)

(The whole calendar api is just awkward anyway, I really need to do a KDate class to wrap it all).</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39912#file39912line31" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterange.h</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="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; ">class QDebug;</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">31</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * \brief A simple data structure storing a start and an end date.</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;">Now, where else in KDE have a seen a DateRange class?  Somewhere in kdepim?  Perhaps we need one in kdelibs?</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39912#file39912line101" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterange.h</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="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; ">class QDebug;</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">101</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">static</span> <span class="n">DateRange</span> <span class="n">thisWeek</span><span class="p">(</span> <span class="n">bool</span> <span class="n">includeFutureDays</span> <span class="o">=</span> <span class="nb">true</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;">Bools are bad in public api, you should define an enum.</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39913#file39913line81" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterange.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="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; ">bool DateRange::isValid() 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">81</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">d</span><span class="o">-></span><span class="n">m_start</span><span class="p">.</span><span class="n">isValid</span><span class="p">()</span> <span class="o">&&</span> <span class="n">d</span><span class="o">-></span><span class="n">m_end</span><span class="p">.</span><span class="n">isValid</span><span class="p">()</span> <span class="o">&&</span> <span class="n">d</span><span class="o">-></span><span class="n">m_start</span> <span class="o"><=</span> <span class="n">d</span><span class="o">-></span><span class="n">m_end</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 need to check is valid in the local calendar instead using calendar()->isValid(date)</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39913#file39913line138" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterange.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="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; ">bool DateRange::isValid() 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">138</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">weekStartDay</span> <span class="o">></span> <span class="n">date</span><span class="p">.</span><span class="n">dayOfWeek</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;">Technically, you should be using:
  int dayOfWeek = KLocale::locale()->calendar()->dayOfWeek( date )
But there's no calendar systems yet that return a different value so its not wrong either :-)</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39913#file39913line167" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterange.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="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; ">bool DateRange::isValid() 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">167</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">DateRange</span><span class="p">(</span> <span class="n">QDate</span><span class="p">(</span> <span class="n">date</span><span class="p">.</span><span class="n">year</span><span class="p">(),</span> <span class="n">date</span><span class="p">.</span><span class="n">month</span><span class="p">(),</span> <span class="mi">1</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;">Should be localized, but I'll add startOfMonth() and endOfMonth() methods to KCalendarSystem as well to make it easy.</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39913#file39913line183" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterange.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="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; ">bool DateRange::isValid() 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">183</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">DateRange</span><span class="p">(</span> <span class="n">QDate</span><span class="p">(</span> <span class="n">date</span><span class="p">.</span><span class="n">year</span><span class="p">(),</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</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;">Not fully localized, year needs to be included and may get last day for wrong month?  Anyway, new methods to come.</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39913#file39913line207" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterange.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="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; ">bool DateRange::isValid() 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">207</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">for</span><span class="p">(</span> <span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">n</span><span class="p">;</span> <span class="o">++</span><span class="n">i</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;">Perhaps I need to supply an addWeeks() method?</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39913#file39913line230" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterange.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="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; ">bool DateRange::isValid() 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">230</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">for</span><span class="p">(</span> <span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="n">n</span><span class="p">;</span> <span class="o">++</span><span class="n">i</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;">Wouldn't it be easier to use calendar()->addMonths(date,n) instead?</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://svn.reviewboard.kde.org/r/5671/diff/2/?file=39916#file39916line100" style="color: black; font-weight: bold; text-decoration: underline;">trunk/KDE/kdelibs/nepomuk/utils/daterangeselectionwidget.ui</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; "></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">100</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <widget class="QCalendarWidget" name="m_calendar"/></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;">Why not KDatePicker or KDateTable?  It localizes the calendar to the KDE calendar, the Qt one will only ever give you Gregorian.  If you need extra features added let me know.</pre>
</div>
<br />



<p>- John</p>


<br />
<p>On October 22nd, 2010, 6:53 p.m., Sebastian Trueg wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.reviewboard.kde.orgrb/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 kdelibs and Vishesh Handa.</div>
<div>By Sebastian Trueg.</div>


<p style="color: grey;"><i>Updated 2010-10-22 18:53:14</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;">I have been struggling with creating a good facet API for a long time now. I finally reached a point where I am happy with the result. IMHO this is essential enough to get into kdelibs/nepomuk. The first usage will obviously be Dolphin, closely followed by the file dialog. All in all this will make it so much simpler to provide Nepomuk powered search capabilities in applications.
Anyway, this review request is intended for an API review before I commit.</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>trunk/KDE/kdelibs/includes/CMakeLists.txt <span style="color: grey">(1187872)</span></li>

 <li>trunk/KDE/kdelibs/includes/Nepomuk/Utils/DynamicResourceFacet <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/includes/Nepomuk/Utils/Facet <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/includes/Nepomuk/Utils/FacetWidget <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/includes/Nepomuk/Utils/ResourceModel <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/includes/Nepomuk/Utils/SearchWidget <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/includes/Nepomuk/Utils/SimpleFacet <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/includes/Nepomuk/Utils/SimpleResourceModel <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/Mainpage.dox <span style="color: grey">(1187872)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/CMakeLists.txt <span style="color: grey">(1187872)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/datefacet.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/datefacet.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/daterange.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/daterange.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/daterangeselectionwidget.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/daterangeselectionwidget.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/daterangeselectionwidget.ui <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/dynamicresourcefacet.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/dynamicresourcefacet.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facet.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facet.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facetdelegate.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facetdelegate.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facetfiltermodel.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facetfiltermodel.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facetmodel.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facetmodel.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facetwidget.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/facetwidget.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/resourcemodel.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/resourcemodel.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/searchlineedit.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/searchlineedit.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/searchwidget.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/searchwidget.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/searchwidget_p.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/simplefacet.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/simplefacet.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/simpleresourcemodel.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>trunk/KDE/kdelibs/nepomuk/utils/simpleresourcemodel.cpp <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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




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








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