aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/tableview
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2019-11-21 12:53:50 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2019-11-21 15:21:53 +0100
commit41cf477a2a0621d77151bcc88b0ef49632e0b6f1 (patch)
tree4ea45b09994a6a0f088c8936041be2ef315c3603 /tests/manual/tableview
parent4241bb4d26ef69eb212e0274bad0926ec71bead9 (diff)
manual test, tableview: Ensure we modify the right model
An old, unused, model was just lying around in the code. And the buttons in the test was modifying it. But after introducing the syncView concept in 5.14, all the TableViews in the test got their own separate model. So fix up the test to work as it should with the new setup. Change-Id: Ic3e6e3013186ef1c2998566b84b3b94e809296e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/manual/tableview')
-rw-r--r--tests/manual/tableview/abstracttablemodel/main.qml14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/manual/tableview/abstracttablemodel/main.qml b/tests/manual/tableview/abstracttablemodel/main.qml
index 4b9158f03c..9d849f2c8f 100644
--- a/tests/manual/tableview/abstracttablemodel/main.qml
+++ b/tests/manual/tableview/abstracttablemodel/main.qml
@@ -52,12 +52,6 @@ Window {
property int selectedX: -1
property int selectedY: -1
- TestTableModel {
- id: tableModel
- rowCount: 200
- columnCount: 200
- }
-
Rectangle {
anchors.fill: parent
anchors.margins: 10
@@ -72,19 +66,19 @@ Window {
spacing: 1
Button {
text: "Add row"
- onClicked: tableModel.insertRows(selectedY, 1)
+ onClicked: tableView.model.insertRows(selectedY, 1)
}
Button {
text: "Remove row"
- onClicked: tableModel.removeRows(selectedY, 1)
+ onClicked: tableView.model.removeRows(selectedY, 1)
}
Button {
text: "Add column"
- onClicked: tableModel.insertColumns(selectedX, 1)
+ onClicked: tableView.model.insertColumns(selectedX, 1)
}
Button {
text: "Remove column"
- onClicked: tableModel.removeColumns(selectedX, 1)
+ onClicked: tableView.model.removeColumns(selectedX, 1)
}
}