Review Request 108564: Use KTp::ContactFactory in KTp::ContactGridDialog

David Edmundson david at davidedmundson.co.uk
Wed Jan 23 13:05:45 UTC 2013


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

Ship it!


I agree with your comment.




- David Edmundson


On Jan. 23, 2013, 7:51 a.m., Dan Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108564/
> -----------------------------------------------------------
> 
> (Updated Jan. 23, 2013, 7:51 a.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Using Tp::ContactFactory causes crash in KTp::ContactsListModel::data(), because cast to KTp::Contact fails and then we dereference a null pointer.
> 
> Question of the day: could we add something like 
> 
> Q_ASSERT_X(!contact.isNull(), "KTp::ContactsListModel::data()", "Cast failed. Did you forget to use Ktp::ContactFactory again?");
> 
> to data() to make it easier to spot the real problem? It took me good 15 minutes to figure out where the null pointer comes from and why the cast fails.
> 
> 
> Diffs
> -----
> 
>   KTp/Widgets/contact-grid-dialog.cpp a23014a 
> 
> Diff: http://git.reviewboard.kde.org/r/108564/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dan Vrátil
> 
>

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


More information about the KDE-Telepathy mailing list