aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-10-16 10:55:26 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2018-10-17 10:59:31 +0000
commitb09bc0c0ebd8ff35ab5e77b21bd1fdd590347488 (patch)
tree59c058a6396b74583ce339946375d5fcddc13af8 /tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
parentaf4c0ee6c07f020e733574b1af99ab524bc41a9a (diff)
QQmlAdaptorModel: return correct column count from the model
There is no reason for QQmlAdaptorModel to return the wrong column count to the view. For models that are not QAIM, the accessor that wraps the model will report the column count to be 1 anyway. The same is also true for QAbstractListModel. Change-Id: Ia259b044201d76743e5f43d9f0999d3848912075 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicktableview/tst_qquicktableview.cpp')
-rw-r--r--tests/auto/quick/qquicktableview/tst_qquicktableview.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
index 60b938d127..38789fd7bf 100644
--- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
+++ b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
@@ -1466,6 +1466,7 @@ void tst_QQuickTableView::modelSignals()
QCOMPARE(tableView->columns(), 10);
model.clear();
+ model.setColumnCount(1);
WAIT_UNTIL_POLISHED;
QCOMPARE(tableView->rows(), 0);
QCOMPARE(tableView->columns(), 1);