summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-11-09 18:53:51 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2017-11-30 20:19:13 +0000
commita755c2e52126bea850a04487a9a7d446b03e892a (patch)
tree63b6ad75e3eb9344909c6483a933d924d54e1e05 /src/widgets/widgets
parentba19363529f4c099c6831c26d3acf98fa0c5f702 (diff)
Raise the upper bound on years to 9999
Test-case taken from bug-report; fits in as an easy row in an existing data-driven test. Add similar tests for date-time and time; and an isValid test on the end of year 9999. The date-time parser was using the end of year 7999 as maximum value for dates and date-times; extend this to year 9999, as I can see no reason not to. [ChangeLog][QtCore][QDateTime] Years up to 9999 can now be parsed without error (previously 8000 and beyond were treated as invalid) in all formats (not only in ISO format). Widgets handling dates now support dates to 9999, likewise. Task-number: QTBUG-64401 Change-Id: I518cfa6c2cb4ecc5a85b896dc9e56b4fdd8a8bb1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qcalendarwidget.cpp2
-rw-r--r--src/widgets/widgets/qdatetimeedit.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index d496d86906..71ad2cf093 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -982,7 +982,7 @@ QCalendarModel::QCalendarModel(QObject *parent)
m_firstRow(1),
m_date(QDate::currentDate()),
m_minimumDate(QDate::fromJulianDay(1)),
- m_maximumDate(7999, 12, 31),
+ m_maximumDate(9999, 12, 31),
m_shownYear(m_date.year()),
m_shownMonth(m_date.month()),
m_firstDay(QLocale().firstDayOfWeek()),
diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp
index b6ec6b4065..6d3e44d21e 100644
--- a/src/widgets/widgets/qdatetimeedit.cpp
+++ b/src/widgets/widgets/qdatetimeedit.cpp
@@ -363,7 +363,7 @@ void QDateTimeEdit::setMinimumDateTime(const QDateTime &dt)
clearMaximumDateTime().
By default, this property contains a date that refers to 31 December,
- 7999 and a time of 23:59:59 and 999 milliseconds.
+ 9999 and a time of 23:59:59 and 999 milliseconds.
\sa minimumDateTime(), minimumTime(), maximumTime(), minimumDate(),
maximumDate(), setDateTimeRange(), setDateRange(), setTimeRange(),
@@ -466,7 +466,7 @@ void QDateTimeEdit::clearMinimumDate()
necessary to ensure that the range remains valid. If the date is
not a valid QDate object, this function does nothing.
- By default, this property contains a date that refers to December 31, 7999.
+ By default, this property contains a date that refers to December 31, 9999.
\sa minimumDate, minimumTime, maximumTime, setDateRange()
*/