ScrollView: Stop clipping by default, modernize JS
This is the less controversial part of !265 (closed)
Stop clipping by default
For two reasons.
-
This is already set by default on its contentItem Flickable in QQuickScrollViewPrivate::ensureFlickable method. It won't apply to any custom flickable is manually declared or assigned though, such as any ListView or GridView, so this is not a very compelling reason. But...
-
No other/upstream style does this. Thus, it sets up a trap of false expectations for developers. By implementing this "convenience helper" here, we are potentially masking bugs in their layout (such as missing clipping on ListView), and those bugs would surface on other styles, should they fallback to Basic or switch to Material for some reason. So, don't overdo this. Style implementation is not an appropriate place to add non-standard unexpected features.
Port internal method to new optional chaining syntax
It is somewhat shorter this way, and does not require an extra meta-data for redundant method.