From: Miikka Heikkinen Date: Thu, 31 May 2012 08:58:18 +0000 (+0300) Subject: Fix tst_qlistwidget::fastScroll test case X-Git-Tag: 071012110112~680 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32fa7a54103eef9da9f6eb75274c4ff15793ea44;p=profile%2Fivi%2Fqtbase.git Fix tst_qlistwidget::fastScroll test case tst_qlistwidget::fastScroll fails if the mouse cursor happens to be over the tested widget, because that causes an item to highlight, resulting in unexpected region of widget to be painted. Fixed by forcing the mouse cursor off the widget before the test. Task-number: QTBUG-24299 Change-Id: I8f45541feda44681179d43eda67d970d5fea4e40 Reviewed-by: Friedemann Kleint --- diff --git a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp index afc24cd..9407fe0 100644 --- a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp +++ b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp @@ -1515,6 +1515,11 @@ void tst_QListWidget::fastScroll() topLevel.resize(300, 300); // toplevel needs to be wide enough for the item topLevel.show(); + + // Force the mouse cursor off the widget as it causes item it is over to highlight, + // which causes unexpected paint region. + QTest::mouseMove(&widget, QPoint(-10, -10)); + // Make sure the widget gets the first full repaint. On // some WMs, we'll get two (first inactive exposure, then // active exposure.