diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-08-31 08:43:47 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-08-31 12:52:31 (GMT) |
commit | 2277c6c17fb15a11a36a6071687dd0a654dfbb37 (patch) | |
tree | 4ece33a8a5ead469ac574268999fd0bd040d143a /tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | |
parent | fd8ced2fda546a4b5ef735a06cac42d1f989c1ae (diff) | |
download | Qt-2277c6c17fb15a11a36a6071687dd0a654dfbb37.zip Qt-2277c6c17fb15a11a36a6071687dd0a654dfbb37.tar.gz Qt-2277c6c17fb15a11a36a6071687dd0a654dfbb37.tar.bz2 |
Fixed regression in qgraphicswidget test updateFocusChainWhenChildDie.
Oftentimes and depending on your window manager, QTest::mouseClick is not
enough to set the focus on a widget. QTest::mouseMove to that widget first.
Reviewed-by: ogoffart
Diffstat (limited to 'tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp')
-rw-r--r-- | tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index fe25399..663de22 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -1483,6 +1483,7 @@ void tst_QGraphicsWidget::updateFocusChainWhenChildDie() w->setParentItem(parent); //We don't crash perfect QVERIFY(w); + QTest::mouseMove(view.viewport()); QTest::mouseClick(view.viewport(), Qt::LeftButton, 0); QTRY_COMPARE(qApp->activeWindow(), static_cast<QWidget *>(&view)); QTRY_COMPARE(scene.focusItem(), static_cast<QGraphicsItem *>(w)); |