qt5base-lts/tests/auto/qdatetimeedit
Robin Burchell 0bb70c3164 Ensure that QDateTimeEdit::calendarWidget() will always return a valid widget.
This case may be triggered in the (admittedly slightly abnormal) case where a
user wishes to embed the calendar widget in a layout or, for whatever reason, do
something else that will change its ownership.

We work around this by detecting when it is deleted and recreating the widget.

This will also have a positive side effect if setCalendarWidget() is called with
a widget which is then subsequently deleted, returning the default widget
instead of a pointer to (now deleted) memory.

Reviewed-by: Denis Dzyubenko

Merge-request: 2568
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
(cherry picked from commit 124ec3200f8453142717fcfe7a4aa0a55164aaa6)
2011-05-10 12:54:56 +02:00
..
.gitignore Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qdatetimeedit.pro Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
tst_qdatetimeedit.cpp Ensure that QDateTimeEdit::calendarWidget() will always return a valid widget. 2011-05-10 12:54:56 +02:00