Review Request: Minor cleanups and improvements in the KineticScrolling

Zack Rusin zack at kde.org
Sun Mar 14 16:43:11 CET 2010


On Sunday 14 March 2010 08:53:10 Marco Martin wrote:
>  :/ About put things on kineticscrolling or scrollwidget, i know putting
>  everything in kinetikscrolling makes the code a bit more wonky, but i
>  would like it to be there to recycle it for WebView (and possibly other
>  wdgets someday too) as much effortless as possible.

This approach just won't work very well. The main issue is that it only works 
for single items with no children. If you put an item that has child items on 
the thing you won't be able to filter the events making the entire 
KineticScrolling class useless. From the ScrollWidget one can do 
setFiltersChildEvents which deals with exactly this scenario.
This is going to be /especially/ visible on the webview since from Qt 4.7 when 
dealing with CSS animation QtWebKit uses child items to accelerate it, so 
starting Qt 4.7 flicking on web pages will be impossible.

Also to be honest I don't see the appeal of exporting code that really belongs 
in a ScrollWidget to another class to make other widgets that don't inherit 
use ScrollWidget act like ScrollWidgets. They simply should use/be 
ScrollWidgets. Plus it makes Plasma a lot harder to understand when objects 
from beyond the hierarchy always filter coming in events.

z


More information about the Plasma-devel mailing list