Review Request: Fix the runner applet to work with a newer version of Telepathy/KTp

David Edmundson kde at davidedmundson.co.uk
Sun Jul 1 11:47:53 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105398/#review15288
-----------------------------------------------------------


This looks so much neater \o/. Definitely better, one little thing left to fix before you get a ship it - it's basically just moving a tiny bit of code.



src/contactrunner.cpp
<http://git.reviewboard.kde.org/r/105398/#comment11928>

    Would be better to store the Tp::AccountPtr and Tp::ContactPtr here.
    
    It's safer (see below)
    
    



src/contactrunner.cpp
<http://git.reviewboard.kde.org/r/105398/#comment11927>

    Good that you tried to think of dangling pointers, however this doesn't quite work.
    
    If the account goes offline and the contact is removed from the model (between match and run) however the pointer isn't changed or reset to 0 - it just points to garbage data...and then crash.


- David Edmundson


On July 1, 2012, 11:09 a.m., Dan Vratil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105398/
> -----------------------------------------------------------
> 
> (Updated July 1, 2012, 11:09 a.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Since some (git) version of KTp or TelepathyQt (hard to say) the Accounts returned from AccountsModel have "ktp_contacts_" prefix in their ID but accountItemForId() fails to lookup the account with such prefix. Removing the prefix before passing the ID to accountItemForId() fixes the problem.
> 
> This fix does not affect older versions of Telepathy (where accounts don't have the prefix in ID), it just works by default there.
> 
> I guess this should be actually fixed in the AccountsModel (or wherever the problem comes from), but I briefly checked the code and haven't seen any obvious reason for this behavior, so I leave it up to you guys :-)
> 
> 
> This addresses bug 302176.
>     http://bugs.kde.org/show_bug.cgi?id=302176
> 
> 
> Diffs
> -----
> 
>   src/contactrunner.cpp db39190 
> 
> Diff: http://git.reviewboard.kde.org/r/105398/diff/
> 
> 
> Testing
> -------
> 
> Successfully reproduced the bug, with this patch it works again.
> 
> 
> Thanks,
> 
> Dan Vratil
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20120701/12e6b52b/attachment.html>


More information about the KDE-Telepathy mailing list