diff options
Diffstat (limited to 'tests/auto/quick/qquickgridview/tst_qquickgridview.cpp')
-rw-r--r-- | tests/auto/quick/qquickgridview/tst_qquickgridview.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp index 802cc0a4c9..0c9788ab8e 100644 --- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp @@ -51,8 +51,7 @@ #include <QtQuick/private/qquickitem_p.h> #include <QtQuick/private/qquickgridview_p.h> #include <QtQuick/private/qquicktext_p.h> -#include <QtQuick/private/qquickvisualitemmodel_p.h> -#include <QtQml/private/qquicklistmodel_p.h> +#include <QtQml/private/qqmllistmodel_p.h> #include "../../shared/util.h" #include "../shared/viewtestutil.h" #include "../shared/visualtestutil.h" @@ -2435,7 +2434,7 @@ void tst_QQuickGridView::modelChanges() QQuickGridView *gridView = window->rootObject()->findChild<QQuickGridView*>("gridView"); QTRY_VERIFY(gridView); - QQuickListModel *alternateModel = window->rootObject()->findChild<QQuickListModel*>("alternateModel"); + QQmlListModel *alternateModel = window->rootObject()->findChild<QQmlListModel*>("alternateModel"); QTRY_VERIFY(alternateModel); QVariant modelVariant = QVariant::fromValue<QObject *>(alternateModel); QSignalSpy modelSpy(gridView, SIGNAL(modelChanged())); @@ -2871,7 +2870,8 @@ void tst_QQuickGridView::enforceRange_rightToLeft() ctxt->setContextProperty("testTopToBottom", QVariant(true)); window->setSource(testFileUrl("gridview-enforcerange.qml")); - qApp->processEvents(); + window->show(); + QTRY_VERIFY(window->isExposed()); QVERIFY(window->rootObject() != 0); QQuickGridView *gridview = findItem<QQuickGridView>(window->rootObject(), "grid"); @@ -4308,22 +4308,22 @@ void tst_QQuickGridView::snapOneRow_data() QTest::addColumn<qreal>("startExtent"); QTest::newRow("vertical, left to right") << QQuickGridView::FlowLeftToRight << Qt::LeftToRight << int(QQuickItemView::NoHighlightRange) - << QPoint(20, 200) << QPoint(20, 20) << 100.0 << 240.0 << 0.0; + << QPoint(20, 160) << QPoint(20, 20) << 100.0 << 240.0 << 0.0; QTest::newRow("horizontal, left to right") << QQuickGridView::FlowTopToBottom << Qt::LeftToRight << int(QQuickItemView::NoHighlightRange) - << QPoint(200, 20) << QPoint(20, 20) << 100.0 << 240.0 << 0.0; + << QPoint(160, 20) << QPoint(20, 20) << 100.0 << 240.0 << 0.0; QTest::newRow("horizontal, right to left") << QQuickGridView::FlowTopToBottom << Qt::RightToLeft << int(QQuickItemView::NoHighlightRange) - << QPoint(20, 20) << QPoint(200, 20) << -340.0 << -240.0 - 240.0 << -240.0; + << QPoint(20, 20) << QPoint(160, 20) << -340.0 << -240.0 - 240.0 << -240.0; QTest::newRow("vertical, left to right, enforce range") << QQuickGridView::FlowLeftToRight << Qt::LeftToRight << int(QQuickItemView::StrictlyEnforceRange) - << QPoint(20, 200) << QPoint(20, 20) << 100.0 << 340.0 << -20.0; + << QPoint(20, 160) << QPoint(20, 20) << 100.0 << 340.0 << -20.0; QTest::newRow("horizontal, left to right, enforce range") << QQuickGridView::FlowTopToBottom << Qt::LeftToRight << int(QQuickItemView::StrictlyEnforceRange) - << QPoint(200, 20) << QPoint(20, 20) << 100.0 << 340.0 << -20.0; + << QPoint(160, 20) << QPoint(20, 20) << 100.0 << 340.0 << -20.0; QTest::newRow("horizontal, right to left, enforce range") << QQuickGridView::FlowTopToBottom << Qt::RightToLeft << int(QQuickItemView::StrictlyEnforceRange) - << QPoint(20, 20) << QPoint(200, 20) << -340.0 << -240.0 - 240.0 - 100.0 << -220.0; + << QPoint(20, 20) << QPoint(160, 20) << -340.0 << -240.0 - 240.0 - 100.0 << -220.0; } void tst_QQuickGridView::snapOneRow() |