Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.5
-
None
Description
On my 4K monitor:
$ tests/auto/gui/kernel/qtouchevent/tst_qtouchevent multiPointRawEventTranslationOnTouchPad ********* Start testing of tst_QTouchEvent ********* Config: Using QtTest library 6.5.0, Qt 6.5.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 12.1.1 20220629 [revision 7811663964aa7e31c3939b859bbfa2e16919639f]), opensuse-tumbleweed 20220719 PASS : tst_QTouchEvent::initTestCase() FAIL! : tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad() Left value is expected to be less than right value, but is not Left (qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.2)): 0.086 Right (0.05) : 0.05 Loc: [$SRC/qtbase/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp(1204)] PASS : tst_QTouchEvent::cleanupTestCase() Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 64ms ********* Finished testing of tst_QTouchEvent ********
Apparently it is not expecting the value of 0.286. It is instead expecting 0.198 as seen in the comment in the source code:
QCOMPARE_LT(qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.2), 0.05); // 0.198, might depend on window frame size
On my 1080p monitor the test passes.
But I can easily reproduce it by setting QT_SCALE_FACTOR do a fractional number less than 1. Then the lastNormalizedPositions gets crazy values, way beyond 1 which is supposed to be the maximum.
Note that the test fails for the same reason on Android in our CI:
agent:2022/07/25 09:23:35 build.go:394: 244: BFAIL : tst_QTouchEvent::multiPointRawEventTranslationOnTouchPad() Left value is expected to be less than right value, but is not agent:2022/07/25 09:23:35 build.go:394: 244: Left (qAbs(leftWidget.lastNormalizedPositions.at(0).x() - 0.2)): 0.202 agent:2022/07/25 09:23:35 build.go:394: 244: Right (0.05) : 0.05 agent:2022/07/25 09:23:35 build.go:394: 244: Loc: [/home/qt/work/qt/qtbase/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp(1204)]