summaryrefslogtreecommitdiff
path: root/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2011-05-16 09:09:31 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-05-16 09:09:31 +1000
commit5aa1cbcdacd19b2e526e358eddac1b7d55a994b5 (patch)
tree4aba78405e3d98081662fcb934f673acd1b79d42 /tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
parent8592bcc80b7ec245b485fa54f8bd41c4484e93e0 (diff)
parent7e4a9187bb11b794e45d95d2e9fae026d6b0d07d (diff)
downloadqt4-tools-5aa1cbcdacd19b2e526e358eddac1b7d55a994b5.tar.gz
Merge remote branch 'origin/4.8' into qa-review-master
Conflicts: tests/auto/qaccessibility/tst_qaccessibility.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
Diffstat (limited to 'tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp')
-rw-r--r--tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
index abbf00d35d..f5dbea49d3 100644
--- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -275,6 +275,8 @@ private slots:
void focusNextPrevChild();
void taskQTBUG_12384_timeSpecShowTimeOnly();
+
+ void deleteCalendarWidget();
private:
EditorDateEdit* testWidget;
@@ -3431,5 +3433,26 @@ void tst_QDateTimeEdit::taskQTBUG_12384_timeSpecShowTimeOnly()
QCOMPARE(edit.time(), time.time());
}
+void tst_QDateTimeEdit::deleteCalendarWidget()
+{
+ {
+ // setup
+ QCalendarWidget *cw = 0;
+ QDateEdit edit;
+ QVERIFY(!edit.calendarWidget());
+ edit.setCalendarPopup(true);
+ QVERIFY(edit.calendarWidget());
+ edit.calendarWidget()->setObjectName("cw1");;
+
+ // delete
+ cw = edit.calendarWidget();
+ delete cw;
+
+ // it should create a new widget
+ QVERIFY(edit.calendarWidget());
+ QVERIFY(edit.calendarWidget()->objectName() != "cw1");
+ }
+}
+
QTEST_MAIN(tst_QDateTimeEdit)
#include "tst_qdatetimeedit.moc"