Stabilize tst_QCalendarWidget::buttonClickCheck

The window should be shown and activated before sending user input.

Task-number: QTBUG-23615
Change-Id: I2fc1738d9dc4ee7f03c81b040eed6389910a9d3c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
This commit is contained in:
Rohan McGovern 2012-03-06 10:03:35 +10:00 committed by Qt by Nokia
parent 443fd332f9
commit 7206f9c539
2 changed files with 2 additions and 3 deletions

View File

@ -2,6 +2,3 @@ CONFIG += testcase
TARGET = tst_qcalendarwidget
QT += widgets testlib
SOURCES += tst_qcalendarwidget.cpp
# QTBUG-23615 - unstable test
linux-*:system(". /etc/lsb-release && [ $DISTRIB_CODENAME = oneiric ]"):CONFIG += insignificant_test

View File

@ -175,6 +175,8 @@ void tst_QCalendarWidget::buttonClickCheck()
QSize size = object.sizeHint();
object.setGeometry(0,0,size.width(), size.height());
object.show();
QTest::qWaitForWindowShown(&object);
object.activateWindow();
QDate selectedDate(2005, 1, 1);
//click on the month buttons