From 7206f9c539f7302b7349be111e9400c3abb7b048 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 6 Mar 2012 10:03:35 +1000 Subject: [PATCH] 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 --- tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro | 3 --- tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro b/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro index 127d785..f16110c 100644 --- a/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro +++ b/tests/auto/widgets/widgets/qcalendarwidget/qcalendarwidget.pro @@ -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 diff --git a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp index 4f95f80..4857900 100644 --- a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp +++ b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp @@ -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 -- 2.7.4