diff options
author | Liang Qi <liang.qi@qt.io> | 2019-02-22 14:26:13 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-02-22 14:26:13 +0100 |
commit | 3baa2d550512702dfc227aef0af3542ab189824f (patch) | |
tree | fe2967757ce6abe70f3f819cd8f5691cc384288d /tests/auto/quick/qquicktableview/tst_qquicktableview.cpp | |
parent | 16aff415a44f5f10c5ac95da72559839305c8ae5 (diff) | |
parent | 3ad752e1c16a3d37a71c5a7527c7e67cc333cdd2 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
Change-Id: If3bf1abc23a59c458be0bb862d92f2edcb16b79f
Diffstat (limited to 'tests/auto/quick/qquicktableview/tst_qquicktableview.cpp')
-rw-r--r-- | tests/auto/quick/qquicktableview/tst_qquicktableview.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp index e263427b59..60d48bb59f 100644 --- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp +++ b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp @@ -161,6 +161,7 @@ private slots: void checkTableviewInsideAsyncLoader(); void hideRowsAndColumns_data(); void hideRowsAndColumns(); + void checkThatRevisionedPropertiesCannotBeUsedInOldImports(); }; tst_QQuickTableView::tst_QQuickTableView() @@ -2140,6 +2141,17 @@ void tst_QQuickTableView::hideRowsAndColumns() QVERIFY(!columnsToHideList.contains(column)); } +void tst_QQuickTableView::checkThatRevisionedPropertiesCannotBeUsedInOldImports() +{ + // Check that if you use a QQmlAdaptorModel together with a Repeater, the + // revisioned context properties 'row' and 'column' are not accessible. + LOAD_TABLEVIEW("checkmodelpropertyrevision.qml"); + const int resolvedRow = view->rootObject()->property("resolvedDelegateRow").toInt(); + const int resolvedColumn = view->rootObject()->property("resolvedDelegateColumn").toInt(); + QCOMPARE(resolvedRow, 42); + QCOMPARE(resolvedColumn, 42); +} + QTEST_MAIN(tst_QQuickTableView) #include "tst_qquicktableview.moc" |