summaryrefslogtreecommitdiffstats
path: root/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp')
-rw-r--r--tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp5
1 files 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<QToolButton *>(&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<QSpinBox *>(&object, "qt_calendar_yearedit");
QTest::qWait(500);