Review Request: Kineticscrolling: a zero api approach

Marco Martin notmart at gmail.com
Wed Oct 14 15:32:03 CEST 2009



> On 2009-10-14 12:19:32, Adenilson Cavalcanti wrote:
> > /trunk/KDE/kdelibs/plasma/widgets/webview.cpp, line 66
> > <http://reviewboard.kde.org/r/1840/diff/3/?file=12657#file12657line66>
> >
> >     Is this still required?

nope


> On 2009-10-14 12:19:32, Adenilson Cavalcanti wrote:
> > /trunk/KDE/kdelibs/plasma/private/kineticscroll.cpp, line 357
> > <http://reviewboard.kde.org/r/1840/diff/3/?file=12653#file12653line357>
> >
> >     Maybe it pays up to inspect the return value? (from docs: "Returns false if the event was filtered or if the item is disabled. Otherwise returns the value that was returned from the event handler.")

do we need to know if it was filtered?
but yes, not scrolling if the widget is disabled is good


> On 2009-10-14 12:19:32, Adenilson Cavalcanti wrote:
> > /trunk/KDE/kdelibs/plasma/private/kineticscroll.cpp, line 355
> > <http://reviewboard.kde.org/r/1840/diff/3/?file=12653#file12653line355>
> >
> >     How expensive is to remove/set again the event filter? Is it just 2 function calls or it does some black and deep magic in qt event loop?
> >     
> >     My guess is that if it is cheap (not cpu bound), the advantages of the current implementation (i.e. easy of use for clients) outweigths its ugliness until we find a better way.

doesn't seem too heavy.
however the same effect can be acieved with a bool state variable that acts like a semaphore


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1840/#review2646
-----------------------------------------------------------


On 2009-10-14 09:23:44, Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1840/
> -----------------------------------------------------------
> 
> (Updated 2009-10-14 09:23:44)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> this is just an experiment that has perhaps a too big disadvantage to be practical...
> makes use of event filters instead of explicitly forwarding mouse events.
> the advantage is that it would be super easy to use and woouldn't be needed to export new classes in plasma, there could just be an 
> Animator::registerScrollingManager(QGraphicsWidget *) function
> 
> the big disadvantage is that is less controllable, so widgets can't decide to -not- make use of the kineticscrolling, thing that is quite needed in WebView.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/plasma/private/kineticscroll.cpp 1034839 
>   /trunk/KDE/kdelibs/plasma/private/kineticscroll_p.h 1034839 
>   /trunk/KDE/kdelibs/plasma/widgets/scrollwidget.cpp 1034839 
>   /trunk/KDE/kdelibs/plasma/widgets/webview.h 1034839 
>   /trunk/KDE/kdelibs/plasma/widgets/webview.cpp 1034839 
> 
> Diff: http://reviewboard.kde.org/r/1840/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco
> 
>



More information about the Plasma-devel mailing list