<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/101858/">http://git.reviewboard.kde.org/r/101858/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On July 5th, 2011, 7:41 p.m., <b>David Edmundson</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/101858/diff/1/?file=26121#file26121line45" 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; "></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">45</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">PresenceEngine</span><span class="o">::</span><span class="n">m_refCount</span><span class="o">++</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 really ref counting.
It will say how many of this type of object are in the system, not count how many pointers there are to this one instance. (actual ref counting)
Anyway, I'd be very surprised if plasma worked this way. I'm pretty sure if an other plasmoid starts using it, it will increase the ref count of the dataengine and NOT call the constructor again.
I would suggest looking where the parent class has it's ref counter increased.
(arguably this will work to tell if the dataengine exists or not.. which is probably actually all that's needed in reality.)
tl;dr pretty sure this won't work. Happy to be proved wrong if you have evidence otherwise.
</pre>
</blockquote>
<p>On July 5th, 2011, 9:03 p.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;">You're right about the refCount, it is not an actual refCount as that variable was initially used for refCount and then I changed it to static var, but left the name like this. In the end it doesn't really matter, it works as it should, really ;) It works in such way, that the dbus interface exposes a method for returning this refCount var (whatever it really is) only if the dataengine is created, when the dataengine is not in use (ie. deleted), the dbus method does not exist, so in the end it serves its purpose. I can change the variable to something like int isActive, but I think it's enough for a temp workaround.</pre>
</blockquote>
<p>On July 6th, 2011, 12:05 a.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;">Change the name and I'll approve it.
Actually - why have this variable at all?
If you get a dbus response it's active. If you don't - and get a dbus error, then it isn't.
You may even simply be able to see if the dbus address exists and not need any methods in the address at all.
</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;">I was thinking exactly about this this morning. The property is completely useless, we should be fine with just the dbus path being created. I intend(ed) to work on this later today, so I'll post an updated patch sometime this evening.</pre>
<br />
<p>- Martin</p>
<br />
<p>On July 5th, 2011, 7:15 p.m., Martin Klapetek 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 Martin Klapetek.</div>
<p style="color: grey;"><i>Updated July 5, 2011, 7:15 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 simple patch adds a simple dbus adaptor to the dataengine, so it can be checked if the plasmoid is in use (the dataengine is created only with the plasmoid, when not needed, it is deleted). Next part will be checking from contact list for this dbus entry/method. It is meant as a temp workaround for bug 270675, once the upstream has proper features, we will remove it.</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;">Added the plasmoid, dbus interface was created, removed the plasmoid, dbus interface gets removed (though the path still stays, but the method is not valid anymore).</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=270675">270675</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>CMakeLists.txt <span style="color: grey">(69b839a)</span></li>
<li>presence.h <span style="color: grey">(9b199c0)</span></li>
<li>presence.cpp <span style="color: grey">(34fa5ea)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/101858/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>