@@ -54,35 +54,28 @@ AbstractButton {
5454 */
5555 function __showDivider() {
5656 // if we're not in ListView, always show a thin dividing line at the bottom
57− if (ListView.view !== null) {
58−
59− // if we're last item in ListView don't show divider
60− if (index === ListView.view.model.count - 1) return false;
57+ var model = null;
58+ if (typeof ListViewWithPageHeader !== 'undefined') {
59+ if (typeof ListViewWithPageHeader.model !== 'undefined') {
60+ model = ListViewWithPageHeader.model;
61+ }
62+ } else if (ListView.view !== null) {
63+ model = ListView.view.model;
6164 }
65+ // if we're last item in ListView don't show divider
66+ if (model && index === model.count - 1) return false;
67+
6268 return true;
6369 }
6470
65− property bool __clippingRequired: ListView.view !== null
66− && ListView.view.section.labelPositioning & ViewSection.CurrentLabelAtStart
67−
68− property real __yPositionRelativeToListView: ListView.view ? y - ListView.view.contentY : y
69−
7071 property real __heightToClip: {
7172 // Check this is in position where clipping is needed
72− if (__clippingRequired && __yPositionRelativeToListView <= __sectionDelegateHeight
73− && __yPositionRelativeToListView > -height) {
74− return Math.min(__sectionDelegateHeight - __yPositionRelativeToListView, height);
75− } else {
76− return 0;
77− }
78− }
79−
80− property int __sectionDelegateHeight: {
81− if (__clippingRequired && ListView.view.hasOwnProperty("__sectionDelegateHeight")) {
82− return ListView.view.__sectionDelegateHeight;
83− } else {
84− return 0;
73+ if (typeof ListViewWithPageHeader !== 'undefined') {
74+ if (typeof heightToClip !== 'undefined') {
75+ return heightToClip;
76+ }
8577 }
78+ return 0;
8679 }
8780
8881 /*!