The test has started to be rather flaky, and QCOMPARE provides better
diagnostic messages when failing, printing both the actual and the
expected value.
Pick-to: 6.5
Change-Id: I262e8e85de596ff3502e02ae26a1dd2724af92de
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit d736a5e00030058f90a5f83316581e86e434c119)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>