Quick item view tests: fix compile warning
Don't use QCOMPARE for a true/false test, use QVERIFY. This conveniently fixes the (bogus, perhaps) compiler warning with MSVC about comparing a quint32 (the underlying type of the polishScheduled bitfield) with a bool. Pick-to: 6.5 Change-Id: Ib273ee30906e09955e849e65af2b7ff8ce3e2512 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
5ba3db2126
commit
77886b496d
|
@ -2740,7 +2740,7 @@ void tst_QQuickListView::sectionsSnap()
|
|||
QTRY_VERIFY(listview != nullptr);
|
||||
listview->setSnapMode(snapMode);
|
||||
|
||||
QTRY_COMPARE(QQuickItemPrivate::get(listview)->polishScheduled, false);
|
||||
QTRY_VERIFY(!QQuickItemPrivate::get(listview)->polishScheduled);
|
||||
QTRY_COMPARE(listview->currentIndex(), 0);
|
||||
QCOMPARE(listview->contentY(), qreal(-50));
|
||||
|
||||
|
|
|
@ -2453,7 +2453,7 @@ void tst_QQuickTableView::checkChangingModelFromDelegate()
|
|||
// And since the QML code tried to add another row as well, we
|
||||
// expect rebuildScheduled to be true, and a polish event to be pending.
|
||||
QVERIFY(tableViewPrivate->scheduledRebuildOptions);
|
||||
QCOMPARE(tableViewPrivate->polishScheduled, true);
|
||||
QVERIFY(tableViewPrivate->polishScheduled);
|
||||
WAIT_UNTIL_POLISHED;
|
||||
|
||||
// After handling the polish event, we expect also the third row to now be added
|
||||
|
|
Loading…
Reference in New Issue