summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_tableview.qml
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-01-06 16:35:05 +0100
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2015-02-12 13:08:44 +0000
commita2f81b85d5dfa7fbd3b11557fe38de649a1f6914 (patch)
tree6488905640b7ec0747794cbe9762d2c1f3ed5a8b /tests/auto/controls/data/tst_tableview.qml
parent90293338d43791c30a0dd58a5e9cef29dcc0b2f8 (diff)
downloadqtquickcontrols-a2f81b85d5dfa7fbd3b11557fe38de649a1f6914.tar.gz
BasicTableView refactoring: Separate view from user interaction
One of the main tasks of the user interaction code is to manage the current items selection. However, in the upcoming TreeView, the selection will be completely different, but we still want to keep 99% of the view code. Also, in our TreeView implementation, the user's model is proxyfied by a TreeModelAdaptor. But that's not the case in the TableView. So, in order to keep using the same API, we introduce the __model intermediate property. Where it makes sense, TableView and TreeView share common API through BasicTableView. Change-Id: I0a922c1c1093919df7d880d72fe12ed0f372cc08 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls/data/tst_tableview.qml')
-rw-r--r--tests/auto/controls/data/tst_tableview.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index 33599000..b149e76b 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -512,7 +512,7 @@ TestCase {
table.forceActiveFocus();
// to go to next row (this model has 10 rows)
- table.__incrementCurrentIndex()
+ table.__listView.incrementCurrentIndex()
// read data from the model directly
var valuefrommodel = table.model.dataAt(table.currentRow)
@@ -541,7 +541,7 @@ TestCase {
table.forceActiveFocus();
// to go to next row (this model has 3 rows, read the second row)
- table.__incrementCurrentIndex()
+ table.__listView.incrementCurrentIndex()
verify(table.__currentRowItem !== undefined, "No current item found")
var label = findAChild(table.__currentRowItem, "label")