diff options
author | Zeno Albisser <zeno.albisser@nokia.com> | 2011-03-21 16:56:16 (GMT) |
---|---|---|
committer | Zeno Albisser <zeno.albisser@nokia.com> | 2011-03-22 10:02:49 (GMT) |
commit | 0122202baae21a19aab808eab39e15551953825c (patch) | |
tree | 0d354080448176cd14aa5fe5a871e63da74b1685 /tests/manual | |
parent | 209201b7047c605405a83e9c104f8c81f9195feb (diff) | |
download | Qt-0122202baae21a19aab808eab39e15551953825c.zip Qt-0122202baae21a19aab808eab39e15551953825c.tar.gz Qt-0122202baae21a19aab808eab39e15551953825c.tar.bz2 |
Bugfixing QLocale::weekdays and updating manual test
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/qlocale/calendar.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp index 615e44e..bd4756e 100644 --- a/tests/manual/qlocale/calendar.cpp +++ b/tests/manual/qlocale/calendar.cpp @@ -112,14 +112,8 @@ void CalendarWidget::maximumDateChanged(const QDate &date) } bool CalendarWidget::isWeekendDay(Qt::DayOfWeek day) { - Qt::DayOfWeek start = calendar->locale().weekendStart(); - Qt::DayOfWeek end = calendar->locale().weekendEnd(); - - if (start <= day && day <= end) - return true; - if (start > end && (day >= start || day <= end)) - return true; - return false; + QList<Qt::DayOfWeek> week = calendar->locale().weekdays(); + return !week.contains(day); } void CalendarWidget::updateWeekendDays() { |