aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmltablemodel
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-11-18 16:15:01 +0100
committerLeander Beernaert <leander.beernaert@qt.io>2019-11-25 15:34:40 +0100
commitf1f395b37da163bce2dc3b5fc4e298bb4f56a3e7 (patch)
tree9ce2ba89a86ed754a8ecb8f52181770853e21a08 /tests/auto/qml/qqmltablemodel
parentba494aaa24defe1401f621b791891e696b308756 (diff)
parent0ee087f5a5edd7d1aa39fd15e0dc85985320c09a (diff)
Merge remote-tracking branch 'origin/dev' into wip/cmake
Diffstat (limited to 'tests/auto/qml/qqmltablemodel')
-rw-r--r--tests/auto/qml/qqmltablemodel/qqmltablemodel.pro2
-rw-r--r--tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp28
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);