From b09bc0c0ebd8ff35ab5e77b21bd1fdd590347488 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 16 Oct 2018 10:55:26 +0200 Subject: 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 --- tests/auto/quick/qquicktableview/tst_qquicktableview.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/quick/qquicktableview/tst_qquicktableview.cpp') 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); -- cgit v1.2.3