diff options
Diffstat (limited to 'tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp')
-rw-r--r-- | tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
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); |