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

Dan Vrátil dvratil at redhat.com
Wed Jan 23 07:50:48 UTC 2013


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

(Updated Jan. 23, 2013, 8:50 a.m.)


Review request for Telepathy.


Description (updated)
-------

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/22096603/attachment-0001.html>


More information about the KDE-Telepathy mailing list