diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-22 12:33:52 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-10-22 16:00:22 +0200 |
commit | 1270a88cb3fa446ce2201d4204ff05b8b969f2ea (patch) | |
tree | aa14ad6fc6cb3eb2740a7803c598a8297ac36be1 /tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | |
parent | 328759cdeb7b45eba5569b54ded35e38152ee0d0 (diff) |
Fix compile warnings from tests
Use streaming operators for debug/warnings to avoid qsizehint/int
conflicts.
Don't ignore return values from [[no_discard]] functions.
Don't copy elements from containers that return references.
Remove unused variables.
Change-Id: I7a0bef94a5e828bd8facee0c625ec48c3d1f1bdb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/quick/qquicklistview/tst_qquicklistview.cpp')
-rw-r--r-- | tests/auto/quick/qquicklistview/tst_qquicklistview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp index 51a753c199..00cd06f3ae 100644 --- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp +++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp @@ -5489,9 +5489,9 @@ void tst_QQuickListView::headerSnapToItem() QTest::mouseRelease(window, Qt::LeftButton, Qt::NoModifier, startPos, 200); // Wait 200 ms before we release to avoid trigger a flick // wait for the "fixup" animation to finish - QTest::qWaitFor([&]() + QVERIFY(QTest::qWaitFor([&]() { return !listview->isMoving();} - ); + )); QCOMPARE(listview->contentPosition(), expectedContentPosition); QCOMPARE(listview->headerPosition(), expectedHeaderPosition); |