diff options
author | Simon Hausmann <[email protected]> | 2015-04-21 10:48:29 +0200 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2015-04-21 10:41:45 +0000 |
commit | 220f2cddad824e2ab41f056a120d01151d3cf9b4 (patch) | |
tree | 44ba830c9c4601706ddd6bfa8eb4c23ae96a3957 /src/qml/jsruntime/qv4jsonobject.cpp | |
parent | cdf59809bd836ff418c6310ecce38c6e354640c3 (diff) |
Stabilize QQuickWindow test
Various test functions use QTest::touch* and QTest::mouse* to synthesize
touch/mouse events. The synthetization relies on the QWindow to be globally
positioned (with regards to the window manager), as it performs a translation
of the supplied window coordinates to global coordinates. If this happens too
early in the window mapping process, we end up with wrong global coordinates,
that in turn mean that when the event is mapped back to the window coordinates
later, it has the wrong coordinates and not what the test expects.
qWaitForWindowActive tries to accommodate this case by waiting until the
positioning of the window is "complete", as opposed to qWaitForWindowExposed,
which returns as soon as we have a rendering surface.
The symptom in the CI system was that when this race condition hit, the y
coordinate of events was off by 28 pixels on Ubuntu machines, which appears to
be the height of the title or menu bar.
Therefore this patch changes test functions that synthesize events to use
qWaitForWindowActive.
Change-Id: Ia8ecff517f4eefb15068ca1c342ef6666681c362
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Frederik Gladhorn <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
0 files changed, 0 insertions, 0 deletions