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.

Change-Id: I3920ab0da725b76fb6c19bbc7cde7920f351af4a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit a17d6f869b8f56213ab2292cdc491d28e4dc3f9b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2022-08-04 11:11:28 +02:00 committed by Qt Cherry-pick Bot
parent afec50df6f
commit 7cf3c80f54

View File

@ -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));