summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-31 08:43:47 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-31 12:52:31 (GMT)
commit2277c6c17fb15a11a36a6071687dd0a654dfbb37 (patch)
tree4ece33a8a5ead469ac574268999fd0bd040d143a
parentfd8ced2fda546a4b5ef735a06cac42d1f989c1ae (diff)
downloadQt-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
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp1
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));