diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-09-09 17:56:02 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-10-15 11:47:29 +0000 |
commit | edc8512580fa16892dc13034e93300cc6a2bba59 (patch) | |
tree | 5f0d60809650ac9188a5ee84f741fc30170a1192 /tests/auto/qml/qqmltablemodel | |
parent | 5fcd32c86413df81b36be6fed162d3da5c7556e2 (diff) |
Models: Move labs classes into src/imports/labsmodels
We want to have only one import URI per library.
Change-Id: I8be524cf361b12bcb423c9efccd4e047ae3d8d0e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmltablemodel')
-rw-r--r-- | tests/auto/qml/qqmltablemodel/qqmltablemodel.pro | 2 | ||||
-rw-r--r-- | tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp | 28 |
2 files changed, 15 insertions, 15 deletions
diff --git a/tests/auto/qml/qqmltablemodel/qqmltablemodel.pro b/tests/auto/qml/qqmltablemodel/qqmltablemodel.pro index 9d298dfdf2..11b11132aa 100644 --- a/tests/auto/qml/qqmltablemodel/qqmltablemodel.pro +++ b/tests/auto/qml/qqmltablemodel/qqmltablemodel.pro @@ -7,4 +7,4 @@ include (../../shared/util.pri) TESTDATA = data/* -QT += core gui qml-private qml quick-private quick testlib qmlmodels-private +QT += core gui qml-private qml quick-private quick testlib diff --git a/tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp b/tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp index d913bcdf9a..5457597df3 100644 --- a/tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp +++ b/tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp @@ -29,8 +29,8 @@ #include <QtTest/qtest.h> #include <QtTest/qsignalspy.h> #include <QtCore/qregularexpression.h> +#include <QtCore/qabstractitemmodel.h> #include <QtQml/private/qqmlengine_p.h> -#include <QtQmlModels/private/qqmltablemodel_p.h> #include <QtQml/qqmlcomponent.h> #include <QtQuick/qquickitem.h> #include <QtQuick/qquickview.h> @@ -68,7 +68,7 @@ void tst_QQmlTableModel::appendRemoveRow() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel") .value<QAbstractTableModel *>(); QVERIFY(model); QCOMPARE(model->rowCount(), 2); QCOMPARE(model->columnCount(), 2); @@ -213,7 +213,7 @@ void tst_QQmlTableModel::appendRowToEmptyModel() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->rowCount(), 0); QCOMPARE(model->columnCount(), 2); @@ -248,7 +248,7 @@ void tst_QQmlTableModel::clear() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->rowCount(), 2); QCOMPARE(model->columnCount(), 2); @@ -287,7 +287,7 @@ void tst_QQmlTableModel::getRow() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->rowCount(), 2); QCOMPARE(model->columnCount(), 2); @@ -318,7 +318,7 @@ void tst_QQmlTableModel::insertRow() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->rowCount(), 2); QCOMPARE(model->columnCount(), 2); @@ -474,7 +474,7 @@ void tst_QQmlTableModel::moveRow() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->columnCount(), 2); QCOMPARE(model->rowCount(), 2); @@ -602,7 +602,7 @@ void tst_QQmlTableModel::setRow() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->columnCount(), 2); QCOMPARE(model->rowCount(), 2); @@ -762,7 +762,7 @@ void tst_QQmlTableModel::setDataThroughDelegate() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->rowCount(), 2); QCOMPARE(model->columnCount(), 2); @@ -825,7 +825,7 @@ void tst_QQmlTableModel::setRowsImperatively() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->rowCount(), 0); QCOMPARE(model->columnCount(), 2); @@ -862,7 +862,7 @@ void tst_QQmlTableModel::setRowsMultipleTimes() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("testModel").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("testModel").value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->rowCount(), 2); QCOMPARE(model->columnCount(), 2); @@ -919,7 +919,7 @@ void tst_QQmlTableModel::dataAndEditing() view.show(); QVERIFY(QTest::qWaitForWindowActive(&view)); - QQmlTableModel *model = view.rootObject()->property("model").value<QQmlTableModel*>(); + auto *model = view.rootObject()->property("model").value<QAbstractTableModel*>(); QVERIFY(model); const QHash<int, QByteArray> roleNames = model->roleNames(); @@ -939,7 +939,7 @@ void tst_QQmlTableModel::omitTableModelColumnIndex() QQmlComponent component(&engine, testFileUrl("omitTableModelColumnIndex.qml")); QCOMPARE(component.status(), QQmlComponent::Ready); - QScopedPointer<QQmlTableModel> model(qobject_cast<QQmlTableModel*>(component.create())); + QScopedPointer<QAbstractTableModel> model(qobject_cast<QAbstractTableModel*>(component.create())); QVERIFY(model); QCOMPARE(model->rowCount(), 2); QCOMPARE(model->columnCount(), 2); @@ -963,7 +963,7 @@ void tst_QQmlTableModel::complexRow() QCOMPARE(tableView->rows(), 2); QCOMPARE(tableView->columns(), 2); - QQmlTableModel *model = tableView->model().value<QQmlTableModel*>(); + auto *model = tableView->model().value<QAbstractTableModel*>(); QVERIFY(model); QCOMPARE(model->rowCount(), 2); QCOMPARE(model->columnCount(), 2); |