Review Request: KToolbar: Do not allow the user to middle-click disabled buttons

David Faure faure at kde.org
Fri Nov 13 14:09:26 GMT 2009


On Sunday 08 November 2009, Frank Reininghaus wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1914/#review2986
> -----------------------------------------------------------
> 
> 
> I have committed the changes to KToolBar and the unit test (slightly
>  modified) to trunk in r1046431.
> 
> I left KActionPrivate::slotTriggered() as it is because my proposed 
change
>  would make the "buttons" argument of the 
triggered(Qt::MouseButtons,
>  Qt::KeyboardModifiers) signal of KAction incorrect if the action is
>  triggered using the keyboard. Ensuring that "buttons" is always 
correct
>  would probably require to add a new member variable to 
KActionPrivate
>  which keeps track of the pressed buttons, and maybe it doesn't 
make much
>  sense to add that overhead to every single action just to fix an issue
>  that hasn't caused any trouble so far.

Maybe a static variable would be enough? AFAIU it's about storing
something between press and release, not storing something for
the longer term.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror 
(http://www.konqueror.org).




More information about the kde-core-devel mailing list