diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-05-18 12:39:14 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-05-18 12:42:03 (GMT) |
commit | 6c16cb557205c8cf33bcf0493b3d9436c6f43236 (patch) | |
tree | a9e6aed7d44727c660a626e69176d3cb8ed792cf /src/gui/widgets | |
parent | 0ff3bb25df3626a8112def75fc3ff048c70ebdb2 (diff) | |
download | Qt-6c16cb557205c8cf33bcf0493b3d9436c6f43236.zip Qt-6c16cb557205c8cf33bcf0493b3d9436c6f43236.tar.gz Qt-6c16cb557205c8cf33bcf0493b3d9436c6f43236.tar.bz2 |
QCalendarWidget::setDateTextFormat() reset the format is the date is invalid
According to the documentation, QCalendarWidget::setDateTextFormat() should
reset the format if the date is not valid.
New tests included for the formating of this widget.
Task-number: 252943
Reviewed-by: Olivier
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qcalendarwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qcalendarwidget.cpp b/src/gui/widgets/qcalendarwidget.cpp index 92c12a5..4436c04 100644 --- a/src/gui/widgets/qcalendarwidget.cpp +++ b/src/gui/widgets/qcalendarwidget.cpp @@ -2791,7 +2791,7 @@ QTextCharFormat QCalendarWidget::dateTextFormat(const QDate &date) const void QCalendarWidget::setDateTextFormat(const QDate &date, const QTextCharFormat &format) { Q_D(QCalendarWidget); - if ( date.isNull() && !format.isValid() ) + if (date.isNull()) d->m_model->m_dateFormats.clear(); else d->m_model->m_dateFormats[date] = format; |