Merge lp:~aacid/unity8/moreAsyncDash into lp:unity8

Proposed by Albert Astals Cid
Status: Merged
Approved by: MichaƂ Sawicz
Approved revision: 1402
Merged at revision: 1506
Proposed branch: lp:~aacid/unity8/moreAsyncDash
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/photoscopeimprovements
Diff against target: 413 lines (+102/-35)
16 files modified
plugins/Dash/abstractdashview.cpp (+24/-5)
plugins/Dash/abstractdashview.h (+6/-0)
plugins/Dash/listviewwithpageheader.cpp (+7/-2)
plugins/Dash/listviewwithpageheader.h (+4/-4)
qml/Components/ResponsiveVerticalJournal.qml (+1/-0)
qml/Dash/CardGrid.qml (+1/-2)
qml/Dash/CardVerticalJournal.qml (+1/-0)
qml/Dash/DashContent.qml (+2/-0)
qml/Dash/DashRenderer.qml (+2/-0)
qml/Dash/GenericScopeView.qml (+45/-19)
qml/Dash/ScopeListView.qml (+4/-2)
tests/plugins/Dash/horizontaljournaltest.qml (+1/-0)
tests/plugins/Dash/listviewwithpageheadertest.cpp (+1/-1)
tests/plugins/Dash/organicgridtest.qml (+1/-0)
tests/plugins/Dash/verticaljournaltest.qml (+1/-0)
tests/qmltests/Dash/tst_GenericScopeView.qml (+1/-0)
To merge this branch: bzr merge lp:~aacid/unity8/moreAsyncDash
Reviewer Review Type Date Requested Status
Andrea Cimitan (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+241524@code.launchpad.net

Commit message

Rework how we set the ranges so we get some more asynchronousity from item views

Description of the change

* Are there any related MPs required for this MP to build/function as expected?
prerequisite

 * Did you perform an exploratory manual test run of your code change and any related functionality?
A few, still have to do more

 * Did you make sure that your branch does not contain spurious tags?
Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
N/A

 * If you changed the UI, has there been a design review?
N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~aacid/unity8/moreAsyncDash updated
1392. By Albert Astals Cid

Merge lp:~aacid/unity8/photoscopeimprovements

1393. By Albert Astals Cid

Remove unused static

1394. By Albert Astals Cid

Set cache buffer to the value it had when the test was written

1395. By Albert Astals Cid

Repair the cachebuffer here too

1396. By Albert Astals Cid

Fix more tests

1397. By Albert Astals Cid

Make test pass

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~aacid/unity8/moreAsyncDash updated
1398. By Albert Astals Cid

Fix infinite loop in creation/deletion of delegates

There's two fixes actually:
 * One fix the calculation of visibleRange
 * Two make sure the displayMargins don't cross the wrong way (too much) otherwise GridView gets all confused and starts the infinite creation/destruction

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~aacid/unity8/moreAsyncDash updated
1399. By Albert Astals Cid

Merge photoscopeimprovements

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) :
Revision history for this message
Albert Astals Cid (aacid) :
lp:~aacid/unity8/moreAsyncDash updated
1400. By Albert Astals Cid

Make cacheBuffer int for consistency with Qt own's classes

1401. By Albert Astals Cid

Merge

1402. By Albert Astals Cid

Small fix after previous real -> int change

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes
 * Did CI run pass? If not, please explain why.
Let's see if it kicks again soon
 * Did you make sure that the branch does not contain spurious tags?
yes

waiting ci again to top approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/Dash/abstractdashview.cpp'
--- plugins/Dash/abstractdashview.cpp 2014-05-22 13:37:05 +0000
+++ plugins/Dash/abstractdashview.cpp 2014-12-03 11:06:35 +0000
@@ -16,13 +16,12 @@
1616
17#include "abstractdashview.h"17#include "abstractdashview.h"
1818
19static const qreal bufferRatio = 0.5;
20
21AbstractDashView::AbstractDashView()19AbstractDashView::AbstractDashView()
22 : m_delegateModel(nullptr)20 : m_delegateModel(nullptr)
23 , m_asyncRequestedIndex(-1)21 , m_asyncRequestedIndex(-1)
24 , m_columnSpacing(0)22 , m_columnSpacing(0)
25 , m_rowSpacing(0)23 , m_rowSpacing(0)
24 , m_buffer(320) // Same value used in qquickitemview.cpp in Qt 5.4
26 , m_displayMarginBeginning(0)25 , m_displayMarginBeginning(0)
27 , m_displayMarginEnd(0)26 , m_displayMarginEnd(0)
28 , m_needsRelayout(false)27 , m_needsRelayout(false)
@@ -112,6 +111,27 @@
112 }111 }
113}112}
114113
114int AbstractDashView::cacheBuffer() const
115{
116 return m_buffer;
117}
118
119void AbstractDashView::setCacheBuffer(int buffer)
120{
121 if (buffer < 0) {
122 qmlInfo(this) << "Cannot set a negative cache buffer";
123 return;
124 }
125
126 if (m_buffer != buffer) {
127 m_buffer = buffer;
128 if (isComponentComplete()) {
129 polish();
130 }
131 emit cacheBufferChanged();
132 }
133}
134
115qreal AbstractDashView::displayMarginBeginning() const135qreal AbstractDashView::displayMarginBeginning() const
116{136{
117 return m_displayMarginBeginning;137 return m_displayMarginBeginning;
@@ -160,9 +180,8 @@
160180
161 const qreal from = -m_displayMarginBeginning;181 const qreal from = -m_displayMarginBeginning;
162 const qreal to = height() + m_displayMarginEnd;182 const qreal to = height() + m_displayMarginEnd;
163 const qreal buffer = (to - from) * bufferRatio;183 const qreal bufferFrom = from - m_buffer;
164 const qreal bufferFrom = from - buffer;184 const qreal bufferTo = to + m_buffer;
165 const qreal bufferTo = to + buffer;
166185
167 bool added = addVisibleItems(from, to, false);186 bool added = addVisibleItems(from, to, false);
168 bool removed = removeNonVisibleItems(bufferFrom, bufferTo);187 bool removed = removeNonVisibleItems(bufferFrom, bufferTo);
169188
=== modified file 'plugins/Dash/abstractdashview.h'
--- plugins/Dash/abstractdashview.h 2014-11-26 10:09:06 +0000
+++ plugins/Dash/abstractdashview.h 2014-12-03 11:06:35 +0000
@@ -35,6 +35,7 @@
35 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)35 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
36 Q_PROPERTY(qreal columnSpacing READ columnSpacing WRITE setColumnSpacing NOTIFY columnSpacingChanged)36 Q_PROPERTY(qreal columnSpacing READ columnSpacing WRITE setColumnSpacing NOTIFY columnSpacingChanged)
37 Q_PROPERTY(qreal rowSpacing READ rowSpacing WRITE setRowSpacing NOTIFY rowSpacingChanged)37 Q_PROPERTY(qreal rowSpacing READ rowSpacing WRITE setRowSpacing NOTIFY rowSpacingChanged)
38 Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer NOTIFY cacheBufferChanged)
38 Q_PROPERTY(qreal displayMarginBeginning READ displayMarginBeginning39 Q_PROPERTY(qreal displayMarginBeginning READ displayMarginBeginning
39 WRITE setDisplayMarginBeginning40 WRITE setDisplayMarginBeginning
40 NOTIFY displayMarginBeginningChanged)41 NOTIFY displayMarginBeginningChanged)
@@ -61,6 +62,9 @@
61 qreal rowSpacing() const;62 qreal rowSpacing() const;
62 void setRowSpacing(qreal rowSpacing);63 void setRowSpacing(qreal rowSpacing);
6364
65 int cacheBuffer() const;
66 void setCacheBuffer(int);
67
64 qreal displayMarginBeginning() const;68 qreal displayMarginBeginning() const;
65 void setDisplayMarginBeginning(qreal);69 void setDisplayMarginBeginning(qreal);
6670
@@ -72,6 +76,7 @@
72 void delegateChanged();76 void delegateChanged();
73 void columnSpacingChanged();77 void columnSpacingChanged();
74 void rowSpacingChanged();78 void rowSpacingChanged();
79 void cacheBufferChanged();
75 void displayMarginBeginningChanged();80 void displayMarginBeginningChanged();
76 void displayMarginEndChanged();81 void displayMarginEndChanged();
7782
@@ -117,6 +122,7 @@
117122
118 int m_columnSpacing;123 int m_columnSpacing;
119 int m_rowSpacing;124 int m_rowSpacing;
125 int m_buffer;
120 qreal m_displayMarginBeginning;126 qreal m_displayMarginBeginning;
121 qreal m_displayMarginEnd;127 qreal m_displayMarginEnd;
122 bool m_needsRelayout;128 bool m_needsRelayout;
123129
=== modified file 'plugins/Dash/listviewwithpageheader.cpp'
--- plugins/Dash/listviewwithpageheader.cpp 2014-11-26 10:09:06 +0000
+++ plugins/Dash/listviewwithpageheader.cpp 2014-12-03 11:06:35 +0000
@@ -334,13 +334,18 @@
334 return m_headerItemShownHeight;334 return m_headerItemShownHeight;
335}335}
336336
337qreal ListViewWithPageHeader::cacheBuffer() const337int ListViewWithPageHeader::cacheBuffer() const
338{338{
339 return m_cacheBuffer;339 return m_cacheBuffer;
340}340}
341341
342void ListViewWithPageHeader::setCacheBuffer(qreal cacheBuffer)342void ListViewWithPageHeader::setCacheBuffer(int cacheBuffer)
343{343{
344 if (cacheBuffer < 0) {
345 qmlInfo(this) << "Cannot set a negative cache buffer";
346 return;
347 }
348
344 if (cacheBuffer != m_cacheBuffer) {349 if (cacheBuffer != m_cacheBuffer) {
345 m_cacheBuffer = cacheBuffer;350 m_cacheBuffer = cacheBuffer;
346 Q_EMIT cacheBufferChanged();351 Q_EMIT cacheBufferChanged();
347352
=== modified file 'plugins/Dash/listviewwithpageheader.h'
--- plugins/Dash/listviewwithpageheader.h 2014-10-10 11:13:26 +0000
+++ plugins/Dash/listviewwithpageheader.h 2014-12-03 11:06:35 +0000
@@ -54,7 +54,7 @@
54 Q_PROPERTY(bool forceNoClip READ forceNoClip WRITE setForceNoClip NOTIFY forceNoClipChanged)54 Q_PROPERTY(bool forceNoClip READ forceNoClip WRITE setForceNoClip NOTIFY forceNoClipChanged)
55 Q_PROPERTY(int stickyHeaderHeight READ stickyHeaderHeight NOTIFY stickyHeaderHeightChanged)55 Q_PROPERTY(int stickyHeaderHeight READ stickyHeaderHeight NOTIFY stickyHeaderHeightChanged)
56 Q_PROPERTY(qreal headerItemShownHeight READ headerItemShownHeight NOTIFY headerItemShownHeightChanged)56 Q_PROPERTY(qreal headerItemShownHeight READ headerItemShownHeight NOTIFY headerItemShownHeightChanged)
57 Q_PROPERTY(qreal cacheBuffer READ cacheBuffer WRITE setCacheBuffer NOTIFY cacheBufferChanged)57 Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer NOTIFY cacheBufferChanged)
5858
59 friend class ListViewWithPageHeaderTest;59 friend class ListViewWithPageHeaderTest;
60 friend class ListViewWithPageHeaderTestSection;60 friend class ListViewWithPageHeaderTestSection;
@@ -85,8 +85,8 @@
85 int stickyHeaderHeight() const;85 int stickyHeaderHeight() const;
86 qreal headerItemShownHeight() const;86 qreal headerItemShownHeight() const;
8787
88 qreal cacheBuffer() const;88 int cacheBuffer() const;
89 void setCacheBuffer(qreal cacheBuffer);89 void setCacheBuffer(int cacheBuffer);
9090
91 Q_INVOKABLE void positionAtBeginning();91 Q_INVOKABLE void positionAtBeginning();
92 Q_INVOKABLE void showHeader();92 Q_INVOKABLE void showHeader();
@@ -204,7 +204,7 @@
204 bool m_forceNoClip;204 bool m_forceNoClip;
205 bool m_inLayout;205 bool m_inLayout;
206 bool m_inContentHeightKeepHeaderShown;206 bool m_inContentHeightKeepHeaderShown;
207 qreal m_cacheBuffer;207 int m_cacheBuffer;
208208
209 // Qt 5.0 doesn't like releasing the items just after itemCreated209 // Qt 5.0 doesn't like releasing the items just after itemCreated
210 // so we delay the releasing until the next updatePolish210 // so we delay the releasing until the next updatePolish
211211
=== modified file 'qml/Components/ResponsiveVerticalJournal.qml'
--- qml/Components/ResponsiveVerticalJournal.qml 2014-10-02 11:08:26 +0000
+++ qml/Components/ResponsiveVerticalJournal.qml 2014-12-03 11:06:35 +0000
@@ -45,6 +45,7 @@
45 property alias rowSpacing: verticalJournalView.rowSpacing45 property alias rowSpacing: verticalJournalView.rowSpacing
46 property alias model: verticalJournalView.model46 property alias model: verticalJournalView.model
47 property alias delegate: verticalJournalView.delegate47 property alias delegate: verticalJournalView.delegate
48 property alias cacheBuffer: verticalJournalView.cacheBuffer
48 property alias displayMarginBeginning: verticalJournalView.displayMarginBeginning49 property alias displayMarginBeginning: verticalJournalView.displayMarginBeginning
49 property alias displayMarginEnd: verticalJournalView.displayMarginEnd50 property alias displayMarginEnd: verticalJournalView.displayMarginEnd
5051
5152
=== modified file 'qml/Dash/CardGrid.qml'
--- qml/Dash/CardGrid.qml 2014-10-30 09:13:09 +0000
+++ qml/Dash/CardGrid.qml 2014-12-03 11:06:35 +0000
@@ -50,7 +50,7 @@
50 model: root.model50 model: root.model
51 displayMarginBeginning: root.displayMarginBeginning51 displayMarginBeginning: root.displayMarginBeginning
52 displayMarginEnd: root.displayMarginEnd52 displayMarginEnd: root.displayMarginEnd
53 cacheBuffer: 053 cacheBuffer: root.cacheBuffer
54 interactive: false54 interactive: false
55 delegate: Item {55 delegate: Item {
56 width: grid.cellWidth56 width: grid.cellWidth
@@ -59,7 +59,6 @@
59 id: loader59 id: loader
60 sourceComponent: cardTool.cardComponent60 sourceComponent: cardTool.cardComponent
61 anchors.horizontalCenter: parent.horizontalCenter61 anchors.horizontalCenter: parent.horizontalCenter
62 asynchronous: true
63 onLoaded: {62 onLoaded: {
64 item.objectName = "delegate" + index;63 item.objectName = "delegate" + index;
65 item.width = Qt.binding(function() { return cardTool.cardWidth; });64 item.width = Qt.binding(function() { return cardTool.cardWidth; });
6665
=== modified file 'qml/Dash/CardVerticalJournal.qml'
--- qml/Dash/CardVerticalJournal.qml 2014-11-05 15:06:42 +0000
+++ qml/Dash/CardVerticalJournal.qml 2014-12-03 11:06:35 +0000
@@ -59,6 +59,7 @@
59 rowSpacing: minimumColumnSpacing59 rowSpacing: minimumColumnSpacing
60 columnWidth: cardTool.cardWidth60 columnWidth: cardTool.cardWidth
6161
62 cacheBuffer: root.cacheBuffer
62 displayMarginBeginning: root.displayMarginBeginning63 displayMarginBeginning: root.displayMarginBeginning
63 displayMarginEnd: root.displayMarginEnd64 displayMarginEnd: root.displayMarginEnd
6465
6566
=== modified file 'qml/Dash/DashContent.qml'
--- qml/Dash/DashContent.qml 2014-10-30 21:43:18 +0000
+++ qml/Dash/DashContent.qml 2014-12-03 11:06:35 +0000
@@ -153,6 +153,7 @@
153153
154 delegate:154 delegate:
155 Loader {155 Loader {
156 id: loader
156 width: ListView.view.width157 width: ListView.view.width
157 height: ListView.view.height158 height: ListView.view.height
158 opacity: { // hide delegate if offscreen159 opacity: { // hide delegate if offscreen
@@ -181,6 +182,7 @@
181 dashContent.scopeLoaded(item.scope.id)182 dashContent.scopeLoaded(item.scope.id)
182 item.paginationCount = Qt.binding(function() { return dashContentList.count } )183 item.paginationCount = Qt.binding(function() { return dashContentList.count } )
183 item.paginationIndex = Qt.binding(function() { return dashContentList.currentIndex } )184 item.paginationIndex = Qt.binding(function() { return dashContentList.currentIndex } )
185 item.visibleToParent = Qt.binding(function() { return loader.opacity != 0 });
184 item.holdingList = dashContentList;186 item.holdingList = dashContentList;
185 item.forceNonInteractive = Qt.binding(function() { return dashContent.forceNonInteractive } )187 item.forceNonInteractive = Qt.binding(function() { return dashContent.forceNonInteractive } )
186 }188 }
187189
=== modified file 'qml/Dash/DashRenderer.qml'
--- qml/Dash/DashRenderer.qml 2014-10-28 09:32:48 +0000
+++ qml/Dash/DashRenderer.qml 2014-12-03 11:06:35 +0000
@@ -23,6 +23,8 @@
2323
24 property int collapsedItemCount: -124 property int collapsedItemCount: -1
2525
26 property int cacheBuffer: 0
27
26 property int displayMarginBeginning: 028 property int displayMarginBeginning: 0
2729
28 property int displayMarginEnd: 030 property int displayMarginEnd: 0
2931
=== modified file 'qml/Dash/GenericScopeView.qml'
--- qml/Dash/GenericScopeView.qml 2014-11-06 15:25:51 +0000
+++ qml/Dash/GenericScopeView.qml 2014-12-03 11:06:35 +0000
@@ -38,6 +38,7 @@
38 readonly property alias subPageShown: subPageLoader.subPageShown38 readonly property alias subPageShown: subPageLoader.subPageShown
39 property int paginationCount: 039 property int paginationCount: 0
40 property int paginationIndex: 040 property int paginationIndex: 0
41 property bool visibleToParent: false
41 property alias pageHeaderTotallyVisible: categoryView.pageHeaderTotallyVisible42 property alias pageHeaderTotallyVisible: categoryView.pageHeaderTotallyVisible
42 property var holdingList: null43 property var holdingList: null
4344
@@ -357,6 +358,7 @@
357 Connections {358 Connections {
358 target: scopeView359 target: scopeView
359 onIsCurrentChanged: rendererLoader.updateRanges();360 onIsCurrentChanged: rendererLoader.updateRanges();
361 onVisibleToParentChanged: rendererLoader.updateRanges();
360 }362 }
361 Connections {363 Connections {
362 target: holdingList364 target: holdingList
@@ -364,7 +366,9 @@
364 }366 }
365367
366 function updateRanges() {368 function updateRanges() {
367 if (holdingList && holdingList.moving) {369 // Don't want to create stress by requesting more items during scope
370 // changes so unless you're not part of the visible scopes just return
371 if (holdingList && holdingList.moving && !scopeView.visibleToParent) {
368 return;372 return;
369 }373 }
370374
@@ -380,28 +384,50 @@
380 }384 }
381385
382 if (item && item.hasOwnProperty("displayMarginBeginning")) {386 if (item && item.hasOwnProperty("displayMarginBeginning")) {
383 // A item view is considered visible from387 // A item view creates its delegates synchronously from
384 // -displayMarginBeginning388 // -displayMarginBeginning
385 // to389 // to
386 // height + item.displayMarginEnd390 // height + displayMarginEnd
391 // Around that area it adds the cacheBuffer area where delegates are created async
392 //
387 // We adjust displayMarginBeginning and displayMarginEnd so393 // We adjust displayMarginBeginning and displayMarginEnd so
388 // * In non visible scopes only the viewport is considered visible394 // * In non visible scopes nothing is considered visible and we set cacheBuffer
389 // that way when you switch to it the visible items are there395 // so that creates the items that would be in the viewport asynchronously
390 // * For visible scopes we increase the visible range by categoryView.height * 1.5396 // * For the current scope set the visible range to the viewport and then
391 // in both directions to make scrolling nicer by mantaining a higher number of397 // use cacheBuffer to create extra items for categoryView.height * 1.5
398 // to make scrolling nicer by mantaining a higher number of
392 // cached items399 // cached items
393 // TODO Improvements400 // * For non current but visible scopes (i.e. when the user changes from one scope
394 // - For non visible scopes we should always have a visible range of 0 and401 // to the next, we set the visible range to the viewport so
395 // make sure the items in the viewport are created with the cache buffer feature402 // items are not culled (invisible) but still use no cacheBuffer
396 // - For visible scopes we should always the have a visible range be exactly the403 // (it will be set once the scope is the current one)
397 // viewport and make sure the rest of items are created with the cache buffer feature404 var displayMarginBeginning = baseItem.y;
398 // To be able to implement that feature VerticalJournal/AbstractDashView needs to405 displayMarginBeginning = -Math.max(-displayMarginBeginning, 0);
399 // make the cache buffer value setable externally406 displayMarginBeginning = -Math.min(-displayMarginBeginning, baseItem.height);
400 var extraMargins = scopeView.isCurrent ? categoryView.height * 1.5 : 0;407 displayMarginBeginning = Math.round(displayMarginBeginning);
401408 var displayMarginEnd = -baseItem.height + seeAll.height + categoryView.height - baseItem.y;
402 item.displayMarginBeginning = Math.round(-Math.max(-baseItem.y - extraMargins, 0));409 displayMarginEnd = -Math.max(-displayMarginEnd, 0);
403 item.displayMarginEnd = -Math.round(Math.max(baseItem.height - extraMargins - seeAll.height -410 displayMarginEnd = -Math.min(-displayMarginEnd, baseItem.height);
404 categoryView.height + baseItem.y, 0));411 displayMarginEnd = Math.round(displayMarginEnd);
412 if (scopeView.isCurrent || scopeView.visibleToParent) {
413 item.displayMarginBeginning = displayMarginBeginning;
414 item.displayMarginEnd = displayMarginEnd;
415 item.cacheBuffer = scopeView.isCurrent ? categoryView.height * 1.5 : 0;
416 } else {
417 var visibleRange = baseItem.height + displayMarginEnd + displayMarginBeginning;
418 if (visibleRange < 0) {
419 item.displayMarginBeginning = displayMarginBeginning;
420 item.displayMarginEnd = displayMarginEnd;
421 item.cacheBuffer = 0;
422 } else {
423 // This should be visibleRange/2 in each of the properties
424 // but some item views still (like GridView) like creating sync delegates even if
425 // the visible range is 0 so let's make sure the visible range is negative
426 item.displayMarginBeginning = displayMarginBeginning - visibleRange;
427 item.displayMarginEnd = displayMarginEnd - visibleRange;
428 item.cacheBuffer = visibleRange;
429 }
430 }
405 }431 }
406 }432 }
407 }433 }
408434
=== modified file 'qml/Dash/ScopeListView.qml'
--- qml/Dash/ScopeListView.qml 2014-10-23 11:59:22 +0000
+++ qml/Dash/ScopeListView.qml 2014-12-03 11:06:35 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2013 Canonical, Ltd.2 * Copyright (C) 2014 Canonical, Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by5 * it under the terms of the GNU General Public License as published by
@@ -20,5 +20,7 @@
20ListViewWithPageHeader {20ListViewWithPageHeader {
21 maximumFlickVelocity: height * 1021 maximumFlickVelocity: height * 10
22 flickDeceleration: height * 222 flickDeceleration: height * 2
23 cacheBuffer: Number.MAX_VALUE23 // 1073741823 is s^30 -1. A quite big number so that you have "infinite" cache, but not so
24 // big so that if you add if with itself you're outside the 2^31 int range
25 cacheBuffer: 1073741823
24}26}
2527
=== modified file 'tests/plugins/Dash/horizontaljournaltest.qml'
--- tests/plugins/Dash/horizontaljournaltest.qml 2014-04-30 10:06:33 +0000
+++ tests/plugins/Dash/horizontaljournaltest.qml 2014-12-03 11:06:35 +0000
@@ -25,6 +25,7 @@
25 rowHeight: 15025 rowHeight: 150
26 columnSpacing: 1026 columnSpacing: 10
27 rowSpacing: 1027 rowSpacing: 10
28 cacheBuffer: Math.max(0, (height + displayMarginEnd + displayMarginBeginning) / 2)
2829
29 delegate: Rectangle {30 delegate: Rectangle {
30 property real randomValue: Math.random()31 property real randomValue: Math.random()
3132
=== modified file 'tests/plugins/Dash/listviewwithpageheadertest.cpp'
--- tests/plugins/Dash/listviewwithpageheadertest.cpp 2014-08-26 08:41:02 +0000
+++ tests/plugins/Dash/listviewwithpageheadertest.cpp 2014-12-03 11:06:35 +0000
@@ -1920,7 +1920,7 @@
19201920
1921 void testAllCacheBuffer()1921 void testAllCacheBuffer()
1922 {1922 {
1923 lvwph->setCacheBuffer(std::numeric_limits<qreal>::max());1923 lvwph->setCacheBuffer(std::numeric_limits<int>::max());
1924 QTRY_COMPARE(lvwph->m_visibleItems.count(), 6);1924 QTRY_COMPARE(lvwph->m_visibleItems.count(), 6);
1925 QCOMPARE(lvwph->m_firstVisibleIndex, 0);1925 QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1926 verifyItem(0, 50., 150., false);1926 verifyItem(0, 50., 150., false);
19271927
=== modified file 'tests/plugins/Dash/organicgridtest.qml'
--- tests/plugins/Dash/organicgridtest.qml 2014-04-30 10:06:33 +0000
+++ tests/plugins/Dash/organicgridtest.qml 2014-12-03 11:06:35 +0000
@@ -27,6 +27,7 @@
27 rowSpacing: 1027 rowSpacing: 10
28 smallDelegateSize: Qt.size(90, 90)28 smallDelegateSize: Qt.size(90, 90)
29 bigDelegateSize: Qt.size(180, 180)29 bigDelegateSize: Qt.size(180, 180)
30 cacheBuffer: Math.max(0, (height + displayMarginEnd + displayMarginBeginning) / 2)
3031
31 delegate: Rectangle {32 delegate: Rectangle {
32 property real randomValue: Math.random()33 property real randomValue: Math.random()
3334
=== modified file 'tests/plugins/Dash/verticaljournaltest.qml'
--- tests/plugins/Dash/verticaljournaltest.qml 2014-04-30 10:06:33 +0000
+++ tests/plugins/Dash/verticaljournaltest.qml 2014-12-03 11:06:35 +0000
@@ -26,6 +26,7 @@
26 columnWidth: 15026 columnWidth: 150
27 columnSpacing: 1027 columnSpacing: 10
28 rowSpacing: 1028 rowSpacing: 10
29 cacheBuffer: Math.max(0, (height + displayMarginEnd + displayMarginBeginning) / 2)
2930
30 delegate: Rectangle {31 delegate: Rectangle {
31 property real randomValue: Math.random()32 property real randomValue: Math.random()
3233
=== modified file 'tests/qmltests/Dash/tst_GenericScopeView.qml'
--- tests/qmltests/Dash/tst_GenericScopeView.qml 2014-11-26 08:27:45 +0000
+++ tests/qmltests/Dash/tst_GenericScopeView.qml 2014-12-03 11:06:35 +0000
@@ -59,6 +59,7 @@
59 GenericScopeView {59 GenericScopeView {
60 id: genericScopeView60 id: genericScopeView
61 anchors.fill: parent61 anchors.fill: parent
62 visibleToParent: true
6263
63 UT.UnityTestCase {64 UT.UnityTestCase {
64 id: testCase65 id: testCase

Subscribers

People subscribed via source and target branches