summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/qlocale/calendar.cpp10
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() {