<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/100968/">http://git.reviewboard.kde.org/r/100968/</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;">A few comments below.

I would suggest using an AccountFactory (a Tp-Qt 0.5 features) when you create the accountManager, it simplifies the code quite a lot, and stops you retrieving data before it&#39;s ready by accident.
</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://git.reviewboard.kde.org/r/100968/diff/1/?file=13172#file13172line59" style="color: black; font-weight: bold; text-decoration: underline;">presence.h</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; ">public:</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">59</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="kt">void</span> <span class="n">addAccount</span><span class="p">(</span><span class="k">const</span> <span class="n">Tp</span><span class="o">::</span><span class="n">AccountPtr</span> <span class="o">&amp;</span><span class="n">account</span><span class="p">);</span></pre></td>
    <th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">54</font></th>
    <td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="kt">void</span> <span class="n">addAccount</span><span class="p">(</span><span class="k">const</span> <span class="n">Tp</span><span class="o">::</span><span class="n">AccountPtr</span> <span class="o">&amp;</span><span class="n">account</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;">suggest onAccountAdded() for consistency

up to you, as you do also call it like a conventional method as well.</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/100968/diff/1/?file=13173#file13173line112" style="color: black; font-weight: bold; text-decoration: underline;">presence.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; ">void PresenceEngine::onAccountManagerReady(Tp::PendingOperation *op)</pre></td>

  </tr>
 </tbody>



 
 




 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">111</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n"><span class="hl">QList</span></span><span class="o"><span class="hl">&lt;</span></span><span class="n">Tp</span><span class="o">::</span><span class="n">AccountPtr</span><span class="o"><span class="hl">&gt;</span></span> <span class="n">accounts</span> <span class="o">=</span> <span class="n">m_accountManager</span><span class="o">-&gt;</span><span class="n">validAccounts</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">99</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">Tp</span><span class="o">::</span><span class="n">Account<span class="hl">Set</span>Ptr</span> <span class="n">accounts</span> <span class="o">=</span> <span class="n">m_accountManager</span><span class="o">-&gt;</span><span class="n">validAccounts</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;">If you&#39;re using and AccountSet of valid accounts you shouldn&#39;t be monitoring the accounts for accountValidityChanged, nor for accountManager fo newAccount / accountRemoved.

An AccountSet is a lot more than just a simple typedef, you haven&#39;t made the full use of it.

You should watch the AccountSet for accountAdded and accountRemoved, which is doing all 3 of the above for you whilst applying the filter. (at least that&#39;s how I understand it)

(currently yours doesn&#39;t list invalid accounts at the start, but will list any newly added invalid accounts, this will fix that)

</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/100968/diff/1/?file=13174#file13174line17" style="color: black; font-weight: bold; text-decoration: underline;">presence.operations</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="#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">17</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    &lt;group name=&quot;setNickname&quot;&gt;</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 this not say setAvatar?</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/100968/diff/1/?file=13177#file13177line127" style="color: black; font-weight: bold; text-decoration: underline;">presencesource.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; ">void PresenceSource::onAccountReady(Tp::PendingOperation *op)</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">126</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">qDebug</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;Nickname changed to &quot;</span> <span class="o">&lt;&lt;</span> <span class="n">nickname</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;">qDebug -&gt; kDebug</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/100968/diff/1/?file=13177#file13177line138" style="color: black; font-weight: bold; text-decoration: underline;">presencesource.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; ">void PresenceSource::onAccountReady(Tp::PendingOperation *op)</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">137</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">qDebug</span><span class="p">()</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;DisplayName changed to &quot;</span> <span class="o">&lt;&lt;</span> <span class="n">displayName</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;">qDebug -&gt; kDebug</pre>
</div>
<br />



<p>- David</p>


<br />
<p>On March 29th, 2011, 12:17 p.m., Dario Freddi wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.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 Telepathy.</div>
<div>By Dario Freddi.</div>


<p style="color: grey;"><i>Updated March 29, 2011, 12:17 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 patch ports the data engine to Telepathy Qt4 0.5.x, and adds new Service operations for setting avatars and nicknames. It also enhances data retrieval and fixes some small bugs here and there.</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;">Engine explorer works flawlessly</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>CMakeLists.txt <span style="color: grey">(409c6135e53ecee63f02a756a9c0d8c5c399fe4e)</span></li>

 <li>plasma-dataengine-presence.desktop <span style="color: grey">(7a850af570113882b1d8c3509e3c260a2fc77353)</span></li>

 <li>presence.h <span style="color: grey">(eb5d6dac20a9e7469508d4b87bb7fd02a5624c24)</span></li>

 <li>presence.cpp <span style="color: grey">(179c8055bbf29bd17eb80faf8fd14a8549a453a9)</span></li>

 <li>presence.operations <span style="color: grey">(0aed15758af9cab6780bd8b31822ce991d045983)</span></li>

 <li>presenceservice.cpp <span style="color: grey">(d7a9a64d3b04acbb5ae19c9b7194c2f47efae74c)</span></li>

 <li>presencesource.h <span style="color: grey">(586b70f258d7b9bd0bc239aba25b599a038cfd4a)</span></li>

 <li>presencesource.cpp <span style="color: grey">(fdab2c400e8833844c7feed71d77927acd9160cf)</span></li>

 <li>setavatarjob.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>setavatarjob.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>setnicknamejob.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>setnicknamejob.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>setrequestedpresencejob.h <span style="color: grey">(40c2ca1f5abff5d82c49f9ac1019b162e9249128)</span></li>

 <li>setrequestedpresencejob.cpp <span style="color: grey">(0a77a48941ab41cebe59b6646ba5bbde796ad7a4)</span></li>

</ul>

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




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








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