diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-06-23 11:20:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-17 15:11:30 +0000 |
commit | a0bd47855004f19b5b4c1bfcee9f170443393bd3 (patch) | |
tree | f50fee702693fb2abe1aee2d657c03e7f63640a3 /tests/auto/quick/qquicktableview | |
parent | e137877eaaa3975a6769fd2dd574bd75876fcfa5 (diff) |
QQuikTableView: use TableViewModel instead of QQmlDelegateModel
Swap out QQmlDelegateModel in favor of the new QQmlTableInstanceModel.
QQmlTableInstanceModel skips using QQmlChangeSets all together, and lets
us subscribe to model changes directly from the underlying QAIM instead.
This will make it much easier to handle model changes more
gracefully later.
Change-Id: I0315e91f39671744fb48d1869e4b73b1becbb929
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicktableview')
-rw-r--r-- | tests/auto/quick/qquicktableview/tst_qquicktableview.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp index 8caced4396..a725a125c2 100644 --- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp +++ b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp @@ -38,7 +38,6 @@ #include <QtQml/qqmlincubator.h> #include <QtQml/private/qqmlobjectmodel_p.h> #include <QtQml/private/qqmllistmodel_p.h> -#include <QtQml/private/qqmldelegatemodel_p.h> #include "testmodel.h" @@ -512,16 +511,11 @@ void tst_QQuickTableView::checkInitialAttachedProperties() const int contextIndex = context->contextProperty("index").toInt(); const QPoint contextCell = getContextRowAndColumn(item.data()); const QString contextModelData = context->contextProperty("modelData").toString(); - const QQmlDelegateModelAttached *delegateModelAttached = - static_cast<QQmlDelegateModelAttached *>( - qmlAttachedPropertiesObject<QQmlDelegateModel>(item)); - const int contextItemsIndex = delegateModelAttached->property("itemsIndex").toInt(); QCOMPARE(contextCell.y(), cell.y()); QCOMPARE(contextCell.x(), cell.x()); QCOMPARE(contextIndex, index); QCOMPARE(contextModelData, QStringLiteral("%1").arg(cell.y())); - QCOMPARE(contextItemsIndex, index); } } |