From aa8393c94fea01a4806b204fd3aa343a4e90666b Mon Sep 17 00:00:00 2001 From: Soroush Rabiei Date: Sat, 14 Jan 2017 20:23:31 +0330 Subject: Add support for calendars beside Gregorian Add QCalendarBackend as a base class for calendar implementations and QCalendar as a facade via which to access it. QDate's implicit implementation of the Gregorian calendar becomes QGregorianCalendar and QDate methods now support choice of calendar. Convert QLocale's CLDR data for month names to a locale-data component of each supported calendar and relevant QLocale methods now support choice of calendar. Adapt Python scripts for locale data generation to extract month name data from CLDR (keeping on version v35.1) into the new calendar-locale files. The locale data for the Gregorian calendar is held in a Roman calendar base, for sharing with other calendars. Add tests for basic uses of the new API. [ChangeLog][QtCore][QCalendar] Added QCalendar to support diverse calendars, supported by implementing QCalendarBackend. [ChangeLog][QtCore][QDate] Allow choice of calendar in various operations, with Gregorian remaining the default. Done-with: Lars Knoll Done-with: Edward Welbourne Fixes: QTBUG-17110 Fixes: QTBUG-950 Change-Id: I9d6278f394269a183aee8156e990cec4d5198ab8 Reviewed-by: Volker Hilsheimer --- tests/auto/corelib/time/qcalendar/qcalendar.pro | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/auto/corelib/time/qcalendar/qcalendar.pro (limited to 'tests/auto/corelib/time/qcalendar/qcalendar.pro') diff --git a/tests/auto/corelib/time/qcalendar/qcalendar.pro b/tests/auto/corelib/time/qcalendar/qcalendar.pro new file mode 100644 index 0000000000..94e8fe8606 --- /dev/null +++ b/tests/auto/corelib/time/qcalendar/qcalendar.pro @@ -0,0 +1,5 @@ +CONFIG += testcase +TARGET = tst_qcalendar +QT = core testlib +SOURCES = \ + tst_qcalendar.cpp -- cgit v1.2.3