<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/107833/">http://git.reviewboard.kde.org/r/107833/</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/107833/diff/1/?file=100536#file100536line55" style="color: black; font-weight: bold; text-decoration: underline;">plasmoid/declarative-plugin/conversation-que-manager.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </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="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">53</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">static</span> <span class="n">ConversationQueManager</span> <span class="o">*</span><span class="n">m_instance</span> <span class="o">=</span> <span class="mi">0</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">44</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">globalConversationQueue</span><span class="o">-></span><span class="n">contains</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;">wow... I actually _forgot_ the if block. :-O

Though on second thought, I don't think it's needed since QList::removeAll() doesn't care if the object is not in the list.</pre>
</div>
<br />



<p>- Lasath</p>


<br />
<p>On December 21st, 2012, 2:44 p.m., Lasath Fernando 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 Telepathy, David Edmundson and Aleix Pol Gonzalez.</div>
<div>By Lasath Fernando.</div>


<p style="color: grey;"><i>Updated Dec. 21, 2012, 2:44 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;">This does a few little fixes to the chat plasmoid getting it closer to being keyboard friendly. 

1. I redid the implementation of ConversationQueManager using a K_GLOBAL_STATIC it's now significantly shorter and more elegant IMHO.
2. I ditched the KAction with a hardcoded shortcut, and instead exposed ConversationQueManager to QML. So that way, the plasmoid can easily invoke dequeueNext() on plasmoid 'activate' shortcut. 

3. I fixed the massive klugde that was the visible property of the Dialog. Now, everything is encased in separate Item, which contains one property: isOpen. It isn't bound to anything - instead, there are methods to change its value. This ceases the infinite binding loop, and allows for a clearer logic. 
I.e. when button is clicked, dialog is closed with ALT+F4 or the model requestsPopout, those methods are called, which update 'isOpen' which in turn propagates the changes to Dialog.visible, ConversationDeleagte.checked and MessagesModel.visibleToUser properties as they are bound to it.

PS: Sorry if that wall of text didn't make any sense - It's difficult to think straight at 2AM :-)</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;">Talked to myself. Unfortunately, I didn't talk to multiple people at once though - hopefully everything should still work.</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=296929">296929</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>plasmoid/declarative-plugin/conversation-que-manager.h <span style="color: grey">(e8ab426)</span></li>

 <li>plasmoid/declarative-plugin/conversation-que-manager.cpp <span style="color: grey">(a7b347a)</span></li>

 <li>plasmoid/declarative-plugin/messages-model.h <span style="color: grey">(233bbfb)</span></li>

 <li>plasmoid/declarative-plugin/qml-plugins.cpp <span style="color: grey">(23a4291)</span></li>

 <li>plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ConversationDelegate.qml <span style="color: grey">(8a8d851)</span></li>

 <li>plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml <span style="color: grey">(feb766b)</span></li>

</ul>

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




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








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