Fix QDateEdit calendar pop-up having wrong date
When the calendar pops up it moves the date to maximum instead of keeping the current date. Problem was caused by QCalendarPopup signalling date change to QDateTimeEdit during internal date synchronization from QDateTimeEdit to QCalendarPopup. Task-number: QTBUG-11422 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com> (cherry picked from commit b0c09896a239197411027e773214a2635744695c) Change-Id: Ib0c09896a239197411027e773214a2635744695c
This commit is contained in:
parent
0572b972d8
commit
ad20e965d7
@ -2532,8 +2532,10 @@ void QDateTimeEditPrivate::syncCalendarWidget()
|
||||
{
|
||||
Q_Q(QDateTimeEdit);
|
||||
if (monthCalendar) {
|
||||
const bool sb = monthCalendar->blockSignals(true);
|
||||
monthCalendar->setDateRange(q->minimumDate(), q->maximumDate());
|
||||
monthCalendar->setDate(q->date());
|
||||
monthCalendar->blockSignals(sb);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user