aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/calendar
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-09-24 16:03:54 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-09-24 15:28:18 +0000
commit7d0ab32ffb5eba1e81032cae3a43750549fb7813 (patch)
treebd815f17e3aaa6374c1ed4d19605f9946249a258 /src/imports/calendar
parent8f1d88448bc8756aac54cfcd7003f0a6c65ff4c7 (diff)
Fix QQuickDayOfWeekModel::setLocale()
It must emit dataChanged() even if the first day of week of the new and old locales are the same. The names are most likely different. Change-Id: I932215821962910ef1fb8a66f2dab81dcc51a3b1 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'src/imports/calendar')
-rw-r--r--src/imports/calendar/qquickdayofweekmodel.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/imports/calendar/qquickdayofweekmodel.cpp b/src/imports/calendar/qquickdayofweekmodel.cpp
index 7f75f784..11a9bc3e 100644
--- a/src/imports/calendar/qquickdayofweekmodel.cpp
+++ b/src/imports/calendar/qquickdayofweekmodel.cpp
@@ -63,11 +63,9 @@ void QQuickDayOfWeekModel::setLocale(const QLocale &locale)
{
Q_D(QQuickDayOfWeekModel);
if (d->locale != locale) {
- bool changed = d->locale.firstDayOfWeek() != locale.firstDayOfWeek();
d->locale = locale;
emit localeChanged();
- if (changed)
- emit dataChanged(index(0, 0), index(6, 0));
+ emit dataChanged(index(0, 0), index(6, 0));
}
}