<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/100838/">http://git.reviewboard.kde.org/r/100838/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On March 29th, 2011, 5:06 p.m., <b>Dario Freddi</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;">Follows a review. Protip: smaller diffs next time, I surely missed something :D
Btw, I see this removes all the bit of Nepomuk integration me and George did time ago: I don't know if you guys already discussed about that, but I'd like at least to have George chiming in and have a look.
Beware of QVariant misuse: besides being wrong, it can be dangerous!</pre>
</blockquote>
<p>On March 29th, 2011, 7:09 p.m., <b>David Edmundson</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;">Just to help clarify things:
We have discussed the nepomuk side, George G was involved in the discussion. It's part of a large plan, hence the absolutely massive diff. As it's such a large set of changes I really want to get this merged as this diff keeps getting larger and larger.
The QVariant mis-use and the coding style switch comes from a sort of upstream (Tp-Yell) for some files which we currently have a local copy of. We've already had to do several bug fixes to it, so I guess we can add this one too.
</pre>
</blockquote>
<p>On March 30th, 2011, 10:01 a.m., <b>Martin Klapetek</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;">Ok, I'll check for the QVariant misuses and then I will add the relevant parts to our almost-upstream-repo too, so the upstream can pick it up.
Also I see you catched a lot of upstream issues, I commented just "Upstream" on them. I think this should be solved upstream first (I'll promote the changes there). I leave the inclusion of those files to the meeting.</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;">Ok, then it's mostly upstream which should be bitch-slapped this time ;D Besides that, nice job on the patch :) Once you fix the remaining issues, it's a "Ship it" from me.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On March 29th, 2011, 5:06 p.m., <b>Dario Freddi</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/100838/diff/4/?file=12726#file12726line99" style="color: black; font-weight: bold; text-decoration: underline;">account-button.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">AccountButton::AccountButton(const Tp::AccountPtr &account, QWidget* parent)</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">99</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">if</span> <span class="p">(</span><span class="n">m_account</span><span class="o">-></span><span class="n">currentPresence</span><span class="p">().</span><span class="n">status</span><span class="p">()</span> <span class="o">==</span> <span class="n">qVariantValue</span><span class="o"><</span><span class="n">Tp</span><span class="o">::</span><span class="n">Presence</span><span class="o">></span><span class="p">(</span><span class="n">a</span><span class="o">-></span><span class="n">data</span><span class="p">()).</span><span class="n">status</span><span class="p">())</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;">For clarity, try using QVariant::value() instead of qVariantFromValue, which was meant as a workaround for old compilers. Your code would become:
a->data().value<Tp::Presence>().status()
Check all the occurrences throughout the code</pre>
</blockquote>
<p>On March 30th, 2011, 9:52 a.m., <b>Martin Klapetek</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;">Wel...don't we want to support older compilers too? ;) It was mostly for some MS compilers iirc, but sure, I can change that.</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;">Yeah, it was meant to be used to support MSVC 6 :D However, if you feel like not changing it don't worry, it's just a matter of making the whole code more readable</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On March 29th, 2011, 5:06 p.m., <b>Dario Freddi</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/100838/diff/4/?file=12726#file12726line102" style="color: black; font-weight: bold; text-decoration: underline;">account-button.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">AccountButton::AccountButton(const Tp::AccountPtr &account, QWidget* parent)</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">102</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QPixmap</span> <span class="n">pixmap</span> <span class="o">=</span> <span class="n">icon</span><span class="p">().</span><span class="n">pixmap</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span> <span class="mi">32</span><span class="p">);</span></pre></td>
</tr>
<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">103</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QPainter</span> <span class="n">painter</span><span class="p">(</span><span class="o">&</span><span class="n">pixmap</span><span class="p">);</span></pre></td>
</tr>
<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">104</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">KIcon</span><span class="p">(</span><span class="n">a</span><span class="o">-></span><span class="n">icon</span><span class="p">()).</span><span class="n">paint</span><span class="p">(</span><span class="o">&</span><span class="n">painter</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">16</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;">It is not very clear to me what you are doing here, but this routine can be extremely slow. Can you please tell me what you are trying to achieve?
I also see there is more than one occurrence of that, so this should indeed optimized if possible.</pre>
</blockquote>
<p>On March 30th, 2011, 9:53 a.m., <b>Martin Klapetek</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;">This paints a small overlay over the account icon. It paints the presence icon (online, offline etc) and I think this is a bit of the original code. What would be a better way to achieve painting a small emblem over an icon?</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;">There is a custom KIcon constructor (please see http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKIcon.html#a6057e88b03b32ca70af2da295d626408 ) which does the dirty job itself when it comes to overlays - it is surely not much more optimized than this, but when QIcon will support overlays natively, we'll get the speed bump for free. I advise you to switch to this method, it will also give more clarity to the code.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On March 29th, 2011, 5:06 p.m., <b>Dario Freddi</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/100838/diff/4/?file=12731#file12731line122" style="color: black; font-weight: bold; text-decoration: underline;">accounts-model.h</a>
<span style="font-weight: normal;">
(Diff revision 4)
</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; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">private:</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">122</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">struct</span> <span class="n">Private</span><span class="p">;</span></pre></td>
</tr>
<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">123</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">friend</span> <span class="k">struct</span> <span class="n">Private</span><span class="p">;</span></pre></td>
</tr>
<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">124</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">Private</span> <span class="o">*</span><span class="n">mPriv</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;">You don't really need a p-impl class here as you are not exporting the model, but if you want to keep it that way, declare it as:
class Private;
Private * const d;
To keep this consistent with KDE's style.</pre>
</blockquote>
<p>On March 30th, 2011, 9:56 a.m., <b>Martin Klapetek</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;">This is again upstream file. It has some stripped header directives so it can be used in our project without problems. I'd leave this for now, we'll talk more about this on the meeting.</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;">Sure. Anyway, if this code comes from other project, we should attach a "This file is from blabla project" notice in the copyrights - but no hurry and not a blocker indeed, we'll talk about it in the meeting.</pre>
<br />
<p>- Dario</p>
<br />
<p>On March 23rd, 2011, 9:32 p.m., Martin Klapetek 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 Martin Klapetek.</div>
<p style="color: grey;"><i>Updated March 23, 2011, 9:32 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 is the work that begun in my clone repo and has matured enough now to be merged back to 'upstream', where the work should continue now.</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;">We did a lot of thourough testing on #kde-telepathy, also some people emailed their reports which all has been fixed.</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">(2c62ea10556cdba38d1bca0fe63603df97414336)</span></li>
<li>account-button.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>account-button.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>account-filter-model.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>account-filter-model.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>accounts-model-item.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>accounts-model-item.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>accounts-model.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>accounts-model.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-delegate-overlay.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-delegate-overlay.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-delegate.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-delegate.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-model-item.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-model-item.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-overlays.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-overlays.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-view-hover-button.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>contact-view-hover-button.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>filter-bar.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>filter-bar.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>main-widget.h <span style="color: grey">(aed6f7c8336321bc8a6ffb3b9af6b1d493f85790)</span></li>
<li>main-widget.cpp <span style="color: grey">(6146b62eec17b54be63b594200613931673ac5fe)</span></li>
<li>main-widget.ui <span style="color: grey">(5b0d5aaaf3a4e2f49eb030b98b15fcae3a86170c)</span></li>
<li>main.cpp <span style="color: grey">(bba0e4175e8853afe603f26ea4707f4974192d0f)</span></li>
<li>ontologies/CMakeLists.txt <span style="color: grey">(3e0bbe8c634908f689dcd360409aeddcc6fc0d23)</span></li>
<li>tree-node.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tree-node.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/100838/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>