summaryrefslogtreecommitdiffstats
path: root/src/gui/platform/unix/qgenericunixservices.cpp
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2022-07-22 14:46:10 +0200
committerDimitrios Apostolou <jimis@qt.io>2022-07-22 19:19:59 +0200
commit45501f6ca60c79eb826cc10422d15e98b167814a (patch)
tree85af5731267940dd353c786c7284202febccbc01 /src/gui/platform/unix/qgenericunixservices.cpp
parent60f61198f2308e4767d57ec22331d77d46c6eb44 (diff)
Ensure list has elements before getting them
Before a recent fix it would happen occasionally that lastNormalizedPositions.at(0) would segfault because the list was empty. The cause of the flakiness was fixed, but make the test more resilient anyway by checking first the list is correctly populated. Furthermore on some platforms this check fails: qAbs(leftWidget.lastNormalizedPositions.at(1).x() - 0.8) < 0.05 So instead of QVERIFY use QCOMPARE_LT to print the values when it fails. Task-number: QTBUG-104268 Change-Id: Id5430eb53c133cf5d23647cfd9749f01f266efce Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/platform/unix/qgenericunixservices.cpp')
0 files changed, 0 insertions, 0 deletions