summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@nokia.com>2010-07-23 08:49:32 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2010-11-02 14:27:22 (GMT)
commitaf082b6b515d45f905aab29e1b685e91bc6f50cf (patch)
tree9d9206e409f710b5e946e6d05a0fc3ad7f1c7002
parentf7fe120e5cad8329f4b4a9bf9bc7fee0d5fbaf9a (diff)
downloadQt-af082b6b515d45f905aab29e1b685e91bc6f50cf.zip
Qt-af082b6b515d45f905aab29e1b685e91bc6f50cf.tar.gz
Qt-af082b6b515d45f905aab29e1b685e91bc6f50cf.tar.bz2
Fixed QCalendarWidget autotest to use a dummy toplevel widget.
Fixed the MousePress to the right position
-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);