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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 10th, 2012, 8:43 a.m., <b>Lasath Fernando</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Overall, looks impressive. 

But I still don't get why you moved the handler directly into ConversationsModel</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I needed to change from what it was because when we handle the channel, I need to know:
 - If we currently have the channel
 - If we want to handle this channel
 - Also we save constructing a channel object only to delete it again.

I guess this could have been done by having a pointer to the conversation model in the handler and turning your "newConvo" slot into a public method with all the required params, and then returns a bool, but given I was doing such a refactor this seemed like a cleaner simpler solution.
</pre>
<br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 10th, 2012, 8:43 a.m., <b>Lasath Fernando</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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/103908/diff/1/?file=49089#file49089line46" style="color: black; font-weight: bold; text-decoration: underline;">plasmoid/declarative-plugin/conversations-model.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">ConversationsModel::ConversationsModel(QObject *parent) :</pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">ConversationsModel::ConversationsModel() :</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">34</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">ConversationsModel</span><span class="o">::</span><span class="n">ConversationsModel</span><span class="p">(</span><span class="n"><span class="hl">QObject</span></span><span class="hl"> </span><span class="o"><span class="hl">*</span></span><span class="n"><span class="hl">parent</span></span><span class="p">)</span> <span class="o">:</span></pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">43</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">ConversationsModel</span><span class="o">::</span><span class="n">ConversationsModel</span><span class="p">()</span> <span class="o">:</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Why did you remove parent? </pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">because it's now ref counted as a handler and deleted when the client registrar is deleted.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 10th, 2012, 8:43 a.m., <b>Lasath Fernando</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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/103908/diff/1/?file=49094#file49094line32" style="color: black; font-weight: bold; text-decoration: underline;">plasmoid/declarative-plugin/telepathy-text-observer.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">static inline Tp::ChannelClassSpecList channelClassList()</pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">TelepathyTextObserver::TelepathyTextObserver(QObject* parent) :</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">32</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">return</span> <span class="n">Tp</span><span class="o">::</span><span class="n">ChannelClassSpecList</span><span class="p">()</span> <span class="o"><<</span> <span class="n">Tp</span><span class="o">::</span><span class="n">ChannelClassSpec</span><span class="o">::</span><span class="n">textChat</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">32</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_handler</span><span class="p">(</span><span class="k">new</span> <span class="n">ConversationsModel</span><span class="p">())</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This isn't parented nor deleted at the end.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">see above.</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On February 10th, 2012, 8:43 a.m., <b>Lasath Fernando</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<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/103908/diff/1/?file=49094#file49094line110" style="color: black; font-weight: bold; text-decoration: underline;">plasmoid/declarative-plugin/telepathy-text-observer.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="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">TelepathyTextObserver::TelepathyTextObserver() :</pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">TelepathyTextObserver::TelepathyTextObserver(QObject* parent) :</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">110</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_registrar</span><span class="o">-></span><span class="n">registerClient</span><span class="p">(</span><span class="n"><span class="hl">observ</span>er</span><span class="p">,</span> <span class="n">QLatin1String</span><span class="p">(</span><span class="s">"KDE.TextUi.ConversationWatcher"</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">66</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_registrar</span><span class="o">-></span><span class="n">registerClient</span><span class="p">(</span><span class="n"><span class="hl">m_handl</span>er</span><span class="p">,</span> <span class="n">QLatin1String</span><span class="p">(</span><span class="s">"KDE.TextUi.ConversationWatcher"</span><span class="p">));</span><span class="hl"> </span><span class="c1"><span class="hl">//KTp.ChatPlasmoid</span></span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I kind of thought up of this in a hurry. Should we try and come up with a better handler name?</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, though weirdly when I did change it it stopped working! which makes no sense</pre>
<br />




<p>- David</p>


<br />
<p>On February 9th, 2012, 11:08 p.m., David Edmundson 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.</div>
<div>By David Edmundson.</div>


<p style="color: grey;"><i>Updated Feb. 9, 2012, 11:08 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;">I'm afraid this patch is a bit huge, but that's just because I've been working hard :-D

In the plasmoid:
Convert plasmoid to a handler from an observer
Support delegate channels (via a nasty hack currently)
Add popout button to delegate to main text UI
Merge the conversationsModel and handler into one class
Fix exposing a load of items to QML for no reason.
Some additional tidying. (and some additional messying :-) )

In the textUI:
Always raise the window in the main Text UI handleChannel unless hint explicitly says otherwise.
Additionally fixes a bug in which reconnecting an account could cause the tabs to 'randomly' switch.

Requires a one line patch in the contact list:

-    hints.setHint("org.kde.telepathy","forceRaiseWindow", QVariant(true));

+    hints.setHint("org.freedesktop.Telepathy.ChannelRequest","DelegateToPreferredHandler", QVariant(true)); 

I'll do delegateChannels properly in TpQt at some point, but I need to know what would happen and we can get this work going in parallel. Also means I have a nice way to test TpQt.
</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>app/chat-tab.cpp <span style="color: grey">(a39526319d90d4c5ddb8e252929f6a0ba3c58640)</span></li>

 <li>app/telepathy-chat-ui.cpp <span style="color: grey">(91ef0e323956c3e376b15843d2f531a277f10a95)</span></li>

 <li>plasmoid/declarative-plugin/channel-delegator.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>plasmoid/declarative-plugin/conversation.h <span style="color: grey">(78fd38dffa7e5e0df230c55440519c05f47f8bf4)</span></li>

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

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

 <li>plasmoid/declarative-plugin/conversations-model.cpp <span style="color: grey">(3967bffa9cad05e33e63a6097ef856ed41eeaa50)</span></li>

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

 <li>plasmoid/declarative-plugin/messages-model.cpp <span style="color: grey">(6cc7c90eae3f1a8ad34e661c2983488ec0f273ac)</span></li>

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

 <li>plasmoid/declarative-plugin/telepathy-text-observer.h <span style="color: grey">(6658ee57db72abea2c3ae53407467d64fdd47273)</span></li>

 <li>plasmoid/declarative-plugin/telepathy-text-observer.cpp <span style="color: grey">(58cf736834fe194a9b9088b4086ad3dcabbe95df)</span></li>

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

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

</ul>

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




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








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