[vlc-devel] [PATCH] Fix QToolButtonExt edge cases

Jean-Baptiste Kempf jb at videolan.org
Mon Dec 19 02:11:09 CET 2011


On Sun, Dec 18, 2011 at 10:37:30AM +0000, Cheng Sun wrote :
> On 18/12/11 00:51, Jean-Baptiste Kempf wrote:
> > On Sat, Dec 17, 2011 at 09:37:33PM +0000, Cheng Sun wrote :
> >> Firstly, once the user presses down on a QToolButtonExt there is no
> >> way to cancel the action; either a short or a long click will be
> >> generated. Compare this to a normal button, which can be cancelled by
> >> releasing the mouse outside of the button area.
> > Agreed.
> >
> >> Secondly, with the mouse button held down, moving the mouse in and out
> >> of the button area will generate multiple short click events, when no
> >> event at all is desired.
> > Agreed too.
> >
> >> -    bool longClick;
> >> +    bool releasedIsDown;
> >> +    bool ignoreNextClick;
> > Very badly chosen variables, if I could say.
> >
> True.
> 
> Attached revised patch which is slightly more verbose (and
> understandable, hopefully)

Applied.


-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list