on xenial help sign in
Fix test
commit3a2d99fb952c86f87e49beb4db891295521d273d authorAlbert Astals <albert.astals@canonical.com> dateWed 16 Apr 2014, 17:27 (13 years ago) parent62dd807
2 files changed+10−7
qml/Components/FilterGrid.qml+9−6 tests/qmltests/Components/tst_FilterGrid.qml+1−1
qml/Components/FilterGrid.qml+9−6
@@ -28,10 +28,13 @@ import "../Components"
2828Item {
2929 id: root
3030
31− /* If true, the number of elements displayed will be limited by collapsedRowCount.
32− If false, all elements will be displayed, effectively looking the same as a regular
33− ResponsiveGridView. Manipulate this property through setFilter */
34− property bool filter: true
31+ QtObject {
32+ id: d
33+ /* If true, the number of elements displayed will be limited by collapsedRowCount.
34+ If false, all elements will be displayed, effectively looking the same as a regular
35+ ResponsiveGridView. Manipulate this property through setFilter */
36+ property bool filter: true
37+ }
3538
3639 /* Whether, when collapsed, a button should be displayed enabling the user to expand
3740 the grid to its full size. */
@@ -81,7 +84,7 @@ Item {
8184 easing.type: Easing.InOutQuad
8285 onRunningChanged: {
8386 if (!running) {
84− limitModel.filter = root.filter;
87+ limitModel.filter = d.filter;
8588 }
8689 heightBehaviour.enabled = false;
8790 }
@@ -90,7 +93,7 @@ Item {
9093
9194 function setFilter(filter, animate) {
9295 heightBehaviour.enabled = animate;
93− root.filter = filter;
96+ d.filter = filter;
9497 if (!animate || !filter) {
9598 limitModel.filter = filter;
9699 }
tests/qmltests/Components/tst_FilterGrid.qml+1−1
@@ -50,6 +50,7 @@ Rectangle {
5050 CheckBox {
5151 id: filterCheckBox
5252 checked: true
53+ onCheckedChanged: filterGrid.setFilter(checked, false /*animate*/)
5354 }
5455 }
5556 }
@@ -99,7 +100,6 @@ Rectangle {
99100 maximumNumberOfColumns: 3
100101 collapsedRowCount:
101102 collapsedRowCountSelector.values[collapsedRowCountSelector.selectedIndex]
102− filter: filterCheckBox.checked
103103 minimumHorizontalSpacing: units.gu(1)
104104 delegateWidth: units.gu(6)
105105 delegateHeight: units.gu(6)