[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: Re: Review Request: Summary: Fix "last seen" property when quitting
From: "Martin Blumenstingl" <darklight.xdarklight () googlemail ! com>
Date: 2011-02-22 20:02:26
Message-ID: 20110222200226.29263.63086 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Feb. 22, 2011, 12:36 a.m., Raphael Kubo da Costa wrote:
> > Looks OK to an outsider. Where's the event loop code you talked about?
PluginManager::slotPluginReadyForUnload() calls pluginInstance->deleteLater();
It may cause problems if the plugins are deleted before the contact list is written \
to the Hard-Disk. And since the actual deletion of the object is triggered by the \
event loop at some point it'd be nice if someone could confirm that my code is OK.
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6526/#review9898
-----------------------------------------------------------
On Feb. 19, 2011, 10:33 p.m., Martin Blumenstingl wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6526/
> -----------------------------------------------------------
>
> (Updated Feb. 19, 2011, 10:33 p.m.)
>
>
> Review request for Kopete.
>
>
> Summary
> -------
>
> This patch fixes another problem with kopete's "Last Seen" feature.
>
> If a contact was online when you close kopete no "last seen" time is shown for
> the contact (once kopete is started again and the given contact is offline
> then).
>
> The reason was quite obvious:
> -first the contact list was saved to the XML file.
> -then all accounts were told to disconnect
> -that updated the last seen property of all contacts
> -the contact list was NOT written to the HDD again
>
> I could not find a reason why the two lines should not be moved.
> All objects which are required by the AccountManager and the ContactList are still \
> in memory. But I'd like someone with better Qt event loop knowledge (due to the \
> deleteLater() calls) to review this, as I'm not 100% sure if I haven't overlooked \
> anything.
>
> This addresses bug 266697.
> https://bugs.kde.org/show_bug.cgi?id=266697
>
>
> Diffs
> -----
>
> /trunk/KDE/kdenetwork/kopete/libkopete/kopetepluginmanager.cpp 1221653
>
> Diff: http://svn.reviewboard.kde.org/r/6526/diff
>
>
> Testing
> -------
>
> The "last seen" property now even survives restarts of kopete :)
>
>
> Thanks,
>
> Martin
>
>
[Attachment #5 (text/html)]
<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://svn.reviewboard.kde.org/r/6526/">http://svn.reviewboard.kde.org/r/6526/</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 22nd, 2011, 12:36 a.m., <b>Raphael \
Kubo da Costa</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;">Looks OK to an outsider. Where's the event loop code you talked \
about?</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;">PluginManager::slotPluginReadyForUnload() calls \
pluginInstance->deleteLater();
It may cause problems if the plugins are deleted before the contact list is written \
to the Hard-Disk. And since the actual deletion of the object is triggered by the \
event loop at some point it'd be nice if someone could confirm that my code is \
OK.</pre> <br />
<p>- Martin</p>
<br />
<p>On February 19th, 2011, 10:33 p.m., Martin Blumenstingl wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://svn.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 Kopete.</div>
<div>By Martin Blumenstingl.</div>
<p style="color: grey;"><i>Updated Feb. 19, 2011, 10:33 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 fixes another problem with kopete's "Last Seen" \
feature.
If a contact was online when you close kopete no "last seen" time is shown \
for the contact (once kopete is started again and the given contact is offline
then).
The reason was quite obvious:
-first the contact list was saved to the XML file.
-then all accounts were told to disconnect
-that updated the last seen property of all contacts
-the contact list was NOT written to the HDD again
I could not find a reason why the two lines should not be moved.
All objects which are required by the AccountManager and the ContactList are still in \
memory. But I'd like someone with better Qt event loop knowledge (due to the \
deleteLater() calls) to review this, as I'm not 100% sure if I haven't \
overlooked anything.</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;">The "last seen" property now even survives restarts of kopete \
:)</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="https://bugs.kde.org/show_bug.cgi?id=266697">266697</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>/trunk/KDE/kdenetwork/kopete/libkopete/kopetepluginmanager.cpp <span \
style="color: grey">(1221653)</span></li>
</ul>
<p><a href="http://svn.reviewboard.kde.org/r/6526/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic