[Development] tst_qwindow failing frequently in dev

Simon Hausmann simon.hausmann at theqtcompany.com
Wed Dec 17 13:02:08 CET 2014


On Tuesday 16. December 2014 13.08.17 Thiago Macieira wrote:
> On Wednesday 03 December 2014 12:14:26 Simon Hausmann wrote:
> > I was able to reproduce this together with Jørgen and uploaded a
> > prospective fix at
> > 
> > 	https://codereview.qt-project.org/#/c/101345/
> 
> The fix seems to have made its way to dev already[1], but I'm still getting
> the error:
> 
>   FAIL!  : tst_QWindow::positioning(default) Compared values are not the
> same Actual   (((framePos)))          : QPoint(639,477)
>      Expected (window.framePosition()): QPoint(80,80)
> 
> http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_04826/macx
> -clang_developer-build_qtnamespace_OSX_10.7/log.txt.gz
> 
> Note that the actual position is now VERY different. Before, it was just
> slightly different.

Yeah, previously it tried to move the window just a little, and so when Jørgen 
and I looked into the test we suspected that the window manager might prevent 
us from moving the window sometimes because it might go _into_ the system menu 
bar (where you can't move a window into at least as a user). Therefore we 
changed the test to move the window into the center of the screen, which 
explains the "Actual" value.

Note how "Actual" and "Expected" are swapped, because the test is written as

    QCOMPARE(framePos, window.framePosition())

So what _is_ happening is that we call QWindow::setFramePosition, which calls 
QCocoaWindow::setGeometry and after waiting for the reception of a 
QEvent::Move, the value that QWindow::framePosition() returns is not what we 
set earlier.



Simon



More information about the Development mailing list