> 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? > > Martin Blumenstingl wrote: > 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 Blumenstingl wrote: > Answering the question myself: since PluginManager::shutdown() is called > from KopeteWindow::queryExit() it's fine. > KopeteWindow::queryExit() is called in the "closeEvent" of the window. > Once the code from the event has been executed Qt returns to the main > loop. > > In my case this is perfect: the contact list will be saved before the > code from the closeEvent has finished executing. > Thus the Plugins are still in memory and we won't run into any trouble > here. > > I'll commit in a week if nobody has any objections.
Committed to trunk and backported to 4.6 branch. The changelog was updated accordingly. - 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 > >
_______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel