on xenial help sign in
Return plain array.
6bda75fMichał Karnicki
tests/qmltests/Components/tst_FilterGrid.qml+6−10
@@ -151,16 +151,12 @@ Rectangle {
151 }
151 }
152
152
153 function test_modelSizeAffectsCollapsedRowCount_data() {
153 function test_modelSizeAffectsCollapsedRowCount_data() {
154− var data = new Array()
154+ return [
155− data.push({ model: fakeModelTwoItems, collapsedRowCountIndex: 0,
155+ { model: fakeModelTwoItems, collapsedRowCountIndex: 0, rowsWhenCollapsed: 1, visibleDelegates: 2 },
156− rowsWhenCollapsed: 1, visibleDelegates: 2 })
157− data.push({ model: fakeModelTwoItems, collapsedRowCountIndex: 1,
156+ { model: fakeModelTwoItems, collapsedRowCountIndex: 1, rowsWhenCollapsed: 1, visibleDelegates: 2 },
158− rowsWhenCollapsed: 1, visibleDelegates: 2 })
159− data.push({ model: fakeModelFourItems, collapsedRowCountIndex: 0,
157+ { model: fakeModelFourItems, collapsedRowCountIndex: 0, rowsWhenCollapsed: 1, visibleDelegates: 3 },
160− rowsWhenCollapsed: 1, visibleDelegates: 3 })
161− data.push({ model: fakeModelFourItems, collapsedRowCountIndex: 1,
158+ { model: fakeModelFourItems, collapsedRowCountIndex: 1, rowsWhenCollapsed: 2, visibleDelegates: 4 },
162− rowsWhenCollapsed: 2, visibleDelegates: 4 })
159+ ]
163− return data
164 }
160 }
165
161
166 function test_modelSizeAffectsCollapsedRowCount(data) {
162 function test_modelSizeAffectsCollapsedRowCount(data) {