diff options
Diffstat (limited to 'tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp')
-rw-r--r-- | tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp index f92eb7c8f9..8fd86ea467 100644 --- a/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp +++ b/tests/auto/widgets/itemviews/qitemview/tst_qitemview.cpp @@ -552,7 +552,7 @@ void tst_QItemView::visualRect() QFETCH(bool, displays); if (!displays){ - QVERIFY(view->visualRect(topIndex) == QRect()); + QCOMPARE(view->visualRect(topIndex), QRect()); return; } @@ -560,15 +560,15 @@ void tst_QItemView::visualRect() view->show(); QVERIFY(view->visualRect(topIndex) != QRect()); - QVERIFY(topIndex == view->indexAt(view->visualRect(topIndex).center())); - QVERIFY(topIndex == view->indexAt(view->visualRect(topIndex).bottomLeft())); - QVERIFY(topIndex == view->indexAt(view->visualRect(topIndex).bottomRight())); - QVERIFY(topIndex == view->indexAt(view->visualRect(topIndex).topLeft())); - QVERIFY(topIndex == view->indexAt(view->visualRect(topIndex).topRight())); + QCOMPARE(topIndex, view->indexAt(view->visualRect(topIndex).center())); + QCOMPARE(topIndex, view->indexAt(view->visualRect(topIndex).bottomLeft())); + QCOMPARE(topIndex, view->indexAt(view->visualRect(topIndex).bottomRight())); + QCOMPARE(topIndex, view->indexAt(view->visualRect(topIndex).topLeft())); + QCOMPARE(topIndex, view->indexAt(view->visualRect(topIndex).topRight())); testViews->hideIndexes(view); QModelIndex hiddenIndex = treeModel->index(1, 0); - QVERIFY(view->visualRect(hiddenIndex) == QRect()); + QCOMPARE(view->visualRect(hiddenIndex), QRect()); } void tst_QItemView::walkScreen(QAbstractItemView *view) @@ -616,7 +616,7 @@ void walkIndex(QModelIndex index, QAbstractItemView *view) if (view->indexAt(point) != index) { qDebug() << "index" << index << "visualRect" << visualRect << point << view->indexAt(point); } - QVERIFY(view->indexAt(point) == index); + QCOMPARE(view->indexAt(point), index); } } |