<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/109289/">http://git.reviewboard.kde.org/r/109289/</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/109289/diff/2/?file=117041#file117041line304" style="color: black; font-weight: bold; text-decoration: underline;">contact-list-widget.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; ">void ContactListWidget::addOverlayButtons()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">304</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">ContactListWidget</span><span class="o">::</span><span class="n">toggleGroups</span><span class="p">(</span><span class="kt"><span class="hl">bool</span></span> <span class="n">show</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">304</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="n">ContactListWidget</span><span class="o">::</span><span class="n">toggleGroups</span><span class="p">(</span><span class="kt"><span class="hl">int</span></span> <span class="n">show</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;">Why don't we pass KTp::ContactsModel::GroupMode as the arg type. It's safer, and we don't need to cast.</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/109289/diff/2/?file=117041#file117041line313" style="color: black; font-weight: bold; text-decoration: underline;">contact-list-widget.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; ">void ContactListWidget::addOverlayButtons()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#ebb1ba" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">313</font></th>
    <td bgcolor="#ffc5ce" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">d</span><span class="o">-></span><span class="n">groupMode</span> <span class="o">=</span> <span class="n">d</span><span class="o">-></span><span class="n">model</span><span class="o">-></span><span class="n">groupMode</span><span class="p">();</span></pre></td>
    <th bgcolor="#ebb1ba" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#ffc5ce" 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 this line to reset the filter bar</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/109289/diff/2/?file=117041#file117041line332" style="color: black; font-weight: bold; text-decoration: underline;">contact-list-widget.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; ">void ContactListWidget::toggleOfflineContacts(bool show)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">332</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">d</span><span class="o">-></span><span class="n">model</span><span class="o">-></span><span class="n">setSortRole</span><span class="p">(</span><span class="n">sort</span> <span class="o">?</span> <span class="n">KTp</span><span class="o">::</span><span class="n">ContactPresenceTypeRole</span> <span class="o">:</span> <span class="n"><span class="hl">Qt</span></span><span class="o">::</span><span class="n">DisplayRole</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">328</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">d</span><span class="o">-></span><span class="n">model</span><span class="o">-></span><span class="n">setSortRole</span><span class="p">(</span><span class="n">sort</span> <span class="o">?</span> <span class="n">KTp</span><span class="o">::</span><span class="n">ContactPresenceTypeRole</span> <span class="o">:</span> <span class="n"><span class="hl">KTp</span></span><span class="o">::</span><span class="n">DisplayRole</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;">alternate way to fix the compile warning


d->model->setSortRole(sort ? (int) KTp::ContactPresenceTypeRole : (int)Qt::DisplayRole);


(not tested)

They get casted to an int for setSortRole anyway</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;">If you think the saving code is messy (though I'm happy with it) you can also look at setting the group mode in the action->data() of the 3 grouping actions. 
Then on shutdown save actionGroup->checkedAction->data(); ... or we can just expose the current group mode from contact list widget and save that instead of fetching data from the action.</pre>

<p>- David</p>


<br />
<p>On March 5th, 2013, 7:36 a.m. UTC, Roman Nazarenko 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 Telepathy.</div>
<div>By Roman Nazarenko.</div>


<p style="color: grey;"><i>Updated March 5, 2013, 7:36 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;">Adds exclusive actions group for contact list grouping.
Depends on this fix: https://git.reviewboard.kde.org/r/109288/

writing config on destruction is dirty, don't know how do I fix it without adding new main widget properties.</pre>
  </td>
 </tr>
</table>




<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=279023">279023</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>contact-list-widget.h <span style="color: grey">(ab2191c)</span></li>

 <li>contact-list-widget.cpp <span style="color: grey">(f931913)</span></li>

 <li>main-widget.h <span style="color: grey">(d72c970)</span></li>

 <li>main-widget.cpp <span style="color: grey">(778c71e)</span></li>

</ul>

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







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








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