[immodule-qt] Turn the argument of QInputContext::filterEvent() into const

Kazuki Ohta mover at hct.zaq.ne.jp
Tue Aug 10 20:11:08 EEST 2004


Your indication sounds valid to me.
I was confused by this issue in implementing uim-qt.

Please commit.
> Hi all, I would like to change a API a little. Please tell me
> what do you think about it.
>
> The 'event' argument of QInputContext::filterEvent() is not a
> const. It impresses a doubt about the interface to developers.
>
> bool QInputContext::filterEvent( QEvent *event )
> {
>     return FALSE;
> }
>
> QEvent that passed to the function is restricted to 'input
> events' such as QKeyEvent. But such events have accept() and
> ignore() methods to indicate whether the event had already been
> accepted by an object (Qt4 has been made it into a base class
> 'QInputEvent' as an improvement). It confuses developers as
> "should I invoke event->accept() in addition to returning TRUE
> when I comsume the event?"
>
> To eliminate such confusion, I would like to make it const. It
> is compatible with both Qt3 and Qt4.
>
> bool QInputContext::filterEvent( const QEvent *event )
> {
>     return FALSE;
> }
>
> -------------------------------
> YamaKen  yamaken at bp.iij4u.or.jp
> _______________________________________________
> immodule-qt mailing list
> immodule-qt at freedesktop.org
> http://freedesktop.org/mailman/listinfo/immodule-qt

-- 
---------------------------------
Move the worl:D!
Kazuki Ohta : mover at hct.zaq.ne.jp



More information about the immodule-qt mailing list