Review Request: Make pressing enter key in presence dialog combobox work
Martin Klapetek
martin.klapetek at gmail.com
Sat Oct 15 10:45:07 UTC 2011
> On Oct. 14, 2011, 5:38 p.m., David Edmundson wrote:
> > dialogs/custom-presence-dialog.cpp, line 80
> > <http://git.reviewboard.kde.org/r/102865/diff/1/?file=38880#file38880line80>
> >
> > Definitely do not need this and your event filter.
> >
> > So why does this not work and your event filter does?
>
> Martin Klapetek wrote:
> Trapping the return key results only in stopping the propagation of that event further, that means that when you press Enter, the dialog won't close. It's not meant to replace the event filter, so..that's why this does not work ;)
>
> David Edmundson wrote:
> Ok, but I still don't understand why using the returnPressed() signal of the KCombobox doesn't work.
> Still, ship this. If we manage to fix it properly then we'll get rid of this event filter.
I did a little test and it works kind of backwards - first it inserts the item to combobox's internal model, then switches the index to it and only then it signals the returnPressed(), so when handling this signal we already have a wrong index. But using the event filter we can catch the return key even before it reaches the combobox itself (and switches the index) and that enables us to handle it however we want.
- Martin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102865/#review7341
-----------------------------------------------------------
On Oct. 14, 2011, 6:07 p.m., Martin Klapetek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102865/
> -----------------------------------------------------------
>
> (Updated Oct. 14, 2011, 6:07 p.m.)
>
>
> Review request for Telepathy.
>
>
> Description
> -------
>
> Adds event filter that catches the return key and does the needed magic that is otherwise broken, fixes bug 283802.
>
>
> This addresses bug 283802.
> http://bugs.kde.org/show_bug.cgi?id=283802
>
>
> Diffs
> -----
>
> dialogs/custom-presence-dialog.h 4a764a9
> dialogs/custom-presence-dialog.cpp 94e2f75
>
> Diff: http://git.reviewboard.kde.org/r/102865/diff/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Martin Klapetek
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20111015/ce68d8be/attachment.html>
More information about the KDE-Telepathy
mailing list