> AFAIK Gatis  is working on this (see 
> https://bugreports.qt.io/browse/QTBUG-69414 ). There is a magic define

I have currently postponed that work. The goal is to move all auto tests that 
rely on mouse to DEFINES += QTEST_QPA_MOUSE_HANDLING. Here is an example of 
before vs after: https://codereview.qt-project.org/c/qt/qtbase/+/210028 
Updating tests in qtbase can be done right now, so any help is welcome. For 
consistency, Qt Quick tests should utilize the QTEST_QPA_MOUSE_HANDLING code 
path as well. Cleaning up Qt Quick tests first requires resolving 
https://bugreports.qt.io/browse/QTBUG-69419 . Some WIP patches for Qt Quick 
Test lib are in https://bugreports.qt.io/browse/QTBUG-69415 , but it might be 
wiser to rewrite it in c++ https://bugreports.qt.io/browse/QTBUG-64837

I think it is worth spending time on this, instead of fighting with flaky or 
hard to read auto tests in future.






________________________________
From: Development <[email protected]> on behalf of Friedemann 
Kleint <[email protected]>
Sent: Tuesday, July 9, 2019 8:33 AM
To: [email protected]
Subject: Re: [Development] QTestlib: how not to test mouseMoveEvent handling

Hi,

AFAIK Gatis  is working this (see
https://bugreports.qt.io/browse/QTBUG-69414 ). There is a magic define

widgets/widgets/qcombobox/qcombobox.pro:4:DEFINES +=
QTEST_QPA_MOUSE_HANDLING
widgets/widgets/qmenu/qmenu.pro:9:    DEFINES += QTEST_QPA_MOUSE_HANDLING

which apparently changes behavior. Alternatively, the overloads of
QTest::mouse*() that take a QWindow * can be used, which should act more
sane. This might require some coordinate mapping, though.

Friedemann

--
Friedemann Kleint
The Qt Company GmbH

_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to