<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/110020/">http://git.reviewboard.kde.org/r/110020/</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/110020/diff/1/?file=138886#file138886line2" style="color: black; font-weight: bold; text-decoration: underline;">KTp/Declarative/telepathy-manager.h</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">2</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm">    Copyright (C) 2013 Aleix Pol <aleixpol@kde.org></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;">Add me here too</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/110020/diff/1/?file=138886#file138886line19" style="color: black; font-weight: bold; text-decoration: underline;">KTp/Declarative/telepathy-manager.h</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">19</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cp">#ifndef DECLARATIVEKTPACTIONS_H</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;">Update.</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/110020/diff/1/?file=138887#file138887line34" style="color: black; font-weight: bold; text-decoration: underline;">KTp/Declarative/telepathy-manager.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <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">34</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">m_accountFactory</span> <span class="o">=</span> <span class="n">Tp</span><span class="o">::</span><span class="n">AccountFactory</span><span class="o">::</span><span class="n">create</span><span class="p">(</span><span class="n">QDBusConnection</span><span class="o">::</span><span class="n">sessionBus</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;">Move the added features here. They shouldn't be in this ctor. That's the point.</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/110020/diff/1/?file=138890#file138890line955" style="color: black; font-weight: bold; text-decoration: underline;">KTp/Models/contacts-filter-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="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QModelIndexList ContactsFilterModel::match(const QModelIndex &start, int role,</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">955</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="n">Q_ASSERT</span><span class="p">(</span><span class="o">!</span><span class="n">roleNames</span><span class="p">().</span><span class="n">keys</span><span class="p">(</span><span class="n">role</span><span class="p">.</span><span class="n">toUtf8</span><span class="p">()).</span><span class="n">isEmpty</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">955</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="c1"><span class="hl">//</span>    Q_ASSERT(!roleNames().keys(role.toUtf8()).isEmpty());</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;">This was a bodge to work round a bug in ContactsModel that I now hit.

We need to export the roleNames in ContactsModel ourselves rather than rely on the source model doing it.. as we haven't set that yet.</pre>
</div>
<br />



<p>- David</p>


<br />
<p>On April 15th, 2013, 12:45 a.m. UTC, David Edmundson 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 David Edmundson.</div>


<p style="color: grey;"><i>Updated April 15, 2013, 12:45 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;">Create a class that manages all Tp::AccountManager

This also handles Tp Actions and Tp::ClientRegistrar so we don't 
This simplifies all our declarative code a lot.

This also allows KTp plasmoids to declare their own client name rather than hardcoding it into the engine (which was wrong)

Basically this fixes _Everything_ in one go.</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;">Updated KTp active to use this:

Relevant code in main:


    Component.onCompleted: {
        telepathyManager.addAllFeatures();
        telepathyManager.becomeReady();
    }



Contact list can create a model directly:
                    model: KTp.ContactsModel {
                        id: contactList
                        accountManager: telepathyManager.accountManager;
                        presenceTypeFilterFlags: KTp.ContactsModel.HideAllOffline;
                        sortRoleString: sortRoleString = "presenceType";
                    }


without any component.onCompleted anywhere.

ChatView is now just:

        Repeater {
            model: KTp.ConversationsModel {
                id: conversationsModel
            }

            delegate: Chat {
                anchors.fill: parent
            }
        }

</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>KTp/Declarative/CMakeLists.txt <span style="color: grey">(32ec1c668afface2f60fd4e884c3987e069d831d)</span></li>

 <li>KTp/Declarative/contact-list.h <span style="color: grey">(ff8fc1bffd0f87298033875233cf5e1d370f6a4f)</span></li>

 <li>KTp/Declarative/contact-list.cpp <span style="color: grey">(d469f2c02dfbaac0b5834e57f4347f8d0219d29d)</span></li>

 <li>KTp/Declarative/conversations-model.h <span style="color: grey">(370825098de456ee70b37d426f2d743209ef5768)</span></li>

 <li>KTp/Declarative/declarative-ktp-actions.h <span style="color: grey">(186d421351fee45d4ef592d50408a20c8d23655c)</span></li>

 <li>KTp/Declarative/declarative-ktp-actions.cpp <span style="color: grey">(46d9c2493040fd0bdedf17ab74a9e1d09a17522c)</span></li>

 <li>KTp/Declarative/qml-plugins.h <span style="color: grey">(5efc4fdaf5fb24b4a547df8c31a16f263049029a)</span></li>

 <li>KTp/Declarative/qml-plugins.cpp <span style="color: grey">(ec7c8afe0824ca61e94c8d544a1c5b9badfc3366)</span></li>

 <li>KTp/Declarative/telepathy-manager.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>KTp/Declarative/telepathy-manager.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>KTp/Declarative/telepathy-text-observer.h <span style="color: grey">(3fa20f88f81e6e3f8b23ca123ba612db83e240c7)</span></li>

 <li>KTp/Declarative/telepathy-text-observer.cpp <span style="color: grey">(a44e5a15ed44a9ff336884b671e8e9cc59531360)</span></li>

 <li>KTp/Models/contacts-filter-model.cpp <span style="color: grey">(49166aa27a8594ef00ee10cbd62b31f8fce6386f)</span></li>

 <li>KTp/Models/contacts-model.h <span style="color: grey">(41c1cb33c73f51f4585a8c36934ae0c96d98e99e)</span></li>

 <li>tests/CMakeLists.txt <span style="color: grey">(bbd06e7930d995a17e294f831a7fead293ed87f5)</span></li>

 <li>tests/pinned-contacts-model-view-main.cpp <span style="color: grey">(e94de014bcd944d95ff63aadee537e6932412733)</span></li>

</ul>

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







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








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