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

LiuCougar liucougar at gmail.com
Tue Aug 10 17:30:32 EEST 2004


fully agree this modification,
thanks

On Tue, 10 Aug 2004 17:27:51 +0900, YamaKen <yamaken at bp.iij4u.or.jp> wrote:
> 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
> 


-- 
"People's characters are strengthened through struggle against
difficulties; they are weakened by comfort."
- Old Chinese adage



More information about the immodule-qt mailing list