From 7cf3c80f541e3d063ac5fbf348ae72693753fad9 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 4 Aug 2022 11:11:28 +0200 Subject: [PATCH] tst_QFocusFrame: fix -Wparantheses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Says Clang 10: tst_qfocusframe.cpp:73:28: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] QTRY_VERIFY(focusFrame = window.findChild()); ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [...] tst_qfocusframe.cpp:73:28: note: place parentheses around the assignment to silence this warning QTRY_VERIFY(focusFrame = window.findChild()); ^ ( tst_qfocusframe.cpp:73:28: note: use '==' to turn this assignment into an equality comparison QTRY_VERIFY(focusFrame = window.findChild()); ^ == Amends f1812aad895ed2b8337a6d98d05623714680aba9. Change-Id: I3920ab0da725b76fb6c19bbc7cde7920f351af4a Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Timur Pocheptsov (cherry picked from commit a17d6f869b8f56213ab2292cdc491d28e4dc3f9b) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp index 92038cfa3af..ce711b7ed77 100644 --- a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp +++ b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp @@ -70,7 +70,7 @@ void tst_QFocusFrame::focusFrameInsideScrollview() window.show(); QFocusFrame *focusFrame = nullptr; - QTRY_VERIFY(focusFrame = window.findChild()); + QTRY_VERIFY((focusFrame = window.findChild())); const QPoint initialOffset = focusFrame->widget()->mapToGlobal(QPoint()) - focusFrame->mapToGlobal(QPoint()); tableView.scrollTo(itemModel->index(40, 0));