diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-08-04 11:11:28 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-08-04 23:33:36 +0200 |
commit | a17d6f869b8f56213ab2292cdc491d28e4dc3f9b (patch) | |
tree | 8c52acea22fa3fb4fd4e839efab9a8402a34b3be | |
parent | 0beb58cf58968acca84bf5f612288fe9c09e5879 (diff) |
tst_QFocusFrame: fix -Wparantheses
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<QFocusFrame *>());
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
tst_qfocusframe.cpp:73:28: note: place parentheses around the assignment to silence this warning
QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>());
^
(
tst_qfocusframe.cpp:73:28: note: use '==' to turn this assignment into an equality comparison
QTRY_VERIFY(focusFrame = window.findChild<QFocusFrame *>());
^
==
Amends f1812aad895ed2b8337a6d98d05623714680aba9.
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: I3920ab0da725b76fb6c19bbc7cde7920f351af4a
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r-- | tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp b/tests/auto/widgets/widgets/qfocusframe/tst_qfocusframe.cpp index 92038cfa3a..ce711b7ed7 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<QFocusFrame *>()); + QTRY_VERIFY((focusFrame = window.findChild<QFocusFrame *>())); const QPoint initialOffset = focusFrame->widget()->mapToGlobal(QPoint()) - focusFrame->mapToGlobal(QPoint()); tableView.scrollTo(itemModel->index(40, 0)); |