aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/calendar/qquickmonthmodel.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-09-25 18:07:32 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-10-03 11:33:06 +0000
commit15693121bcb5214a30e823c59e9683fb8a536318 (patch)
tree60889ad41b2be181d75ecbe54563b617169da2fd /src/imports/calendar/qquickmonthmodel.cpp
parent3ac0236c501eefcb832da5e68b604ca59eec8b5d (diff)
Calendar: validate month & year ranges
Fixes also all Calendar types to use 0-based month. Change-Id: Iee3cafc00e0338b8076fbb3fe195b8491752cbc1 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/calendar/qquickmonthmodel.cpp')
-rw-r--r--src/imports/calendar/qquickmonthmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/calendar/qquickmonthmodel.cpp b/src/imports/calendar/qquickmonthmodel.cpp
index 7188bc00..cdf5656d 100644
--- a/src/imports/calendar/qquickmonthmodel.cpp
+++ b/src/imports/calendar/qquickmonthmodel.cpp
@@ -194,7 +194,7 @@ QVariant QQuickMonthModel::data(const QModelIndex &index, int role) const
case WeekNumberRole:
return date.weekNumber();
case MonthRole:
- return date.month();
+ return date.month() - 1;
case YearRole:
return date.year();
default: