Review Request 111099: Accept KTp::ContactGridDialog by double click

Dan Vrátil dvratil at redhat.com
Wed Jun 19 14:40:07 UTC 2013



> On June 19, 2013, 10:56 a.m., David Edmundson wrote:
> > Can you explain the changes please. 
> > I'm a bit confused by the diff, I don't see why we need to make ContactGridDialog a friend class.

Since KTp::ContactGridWidget is a QWidget that hides the QListView with contacts from public interface, there's no way for the KTp::ContactGridDialog to be notified about the doubleclick event. I tried installing eventFilter for Widget in the Dialog (that is widget->installEventFilter(dialog) ), but the double-click event was never delivered, so I decided to move the WidgetPrivate class into separate file and make Dialog friend of Widget, so that it can reach into the WidgetPrivate class and connect directly to itemDoubleClicked() signal of the listview.

I wanted to avoid exposing the listview into public interface of the Widget, to keep it simple and clean.


- Dan


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


On June 18, 2013, 5:14 p.m., Dan Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111099/
> -----------------------------------------------------------
> 
> (Updated June 18, 2013, 5:14 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> This has been annoying me for ages, but I finally got around to fix it. Even though the change is a bit more invasive that one would expect for such a simple feature, I think it's worth it :-)
> 
> 
> Diffs
> -----
> 
>   KTp/Widgets/contact-grid-dialog.h d9d3712 
>   KTp/Widgets/contact-grid-dialog.cpp f6eb45b 
>   KTp/Widgets/contact-grid-widget-private.h PRE-CREATION 
>   KTp/Widgets/contact-grid-widget.h d6b5468 
>   KTp/Widgets/contact-grid-widget.cpp e4ce9bc 
> 
> Diff: http://git.reviewboard.kde.org/r/111099/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dan Vrátil
> 
>

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


More information about the KDE-Telepathy mailing list