From af082b6b515d45f905aab29e1b685e91bc6f50cf Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Fri, 23 Jul 2010 10:49:32 +0200 Subject: Fixed QCalendarWidget autotest to use a dummy toplevel widget. Fixed the MousePress to the right position --- tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp index 042d8e0..01473d8 100644 --- a/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp +++ b/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp @@ -82,7 +82,8 @@ private slots: // Testing get/set functions void tst_QCalendarWidget::getSetCheck() { - QCalendarWidget object; + QWidget topLevel; + QCalendarWidget object(&topLevel); //horizontal header formats object.setHorizontalHeaderFormat(QCalendarWidget::NoHorizontalHeader); @@ -191,7 +192,7 @@ void tst_QCalendarWidget::buttonClickCheck() QCOMPARE(month, object.monthShown()); button = qFindChild(&object, "qt_calendar_yearbutton"); - QTest::mouseClick(button, Qt::LeftButton); + QTest::mouseClick(button, Qt::LeftButton, Qt::NoModifier, button->rect().center(), 2); QVERIFY(!button->isVisible()); QSpinBox *spinbox = qFindChild(&object, "qt_calendar_yearedit"); QTest::qWait(500); -- cgit v0.12