diff options
author | Soroush Rabiei <soroush@ametisco.ir> | 2019-08-08 20:35:13 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2019-08-22 10:10:02 +0000 |
commit | 702664571252e4f5705e39a8258fc81a3fbf37d4 (patch) | |
tree | 01abab3715dfe2f5193dc56802c1b0d50870cc0d /src/corelib/time/qcalendar.cpp | |
parent | a8cc4cea92bfe4c251458722cbd2e60c49024a2d (diff) |
Add support for the Islamic Civil calendar
This has its own locale data, extracted from CLDR. This data may
potentially be shared with other variants on the Islamic calendar, so
is handled by a separate base-class, QHijriCalendar, on which such
variants may base their implementations.
[ChangeLog][QtCore][QCalendar] Added support for the Islamic Civil
calendar, controlled by feature islamiccivilcalendar, with locale data
that can be shared with other implementations, controlled by feature
hijricalendar.
Fixes: QTBUG-56675
Change-Id: Idf32d3da7034baa8ec5e66ef847e59a8a2f31cbd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/time/qcalendar.cpp')
-rw-r--r-- | src/corelib/time/qcalendar.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/time/qcalendar.cpp b/src/corelib/time/qcalendar.cpp index a315c257de..f6bb242788 100644 --- a/src/corelib/time/qcalendar.cpp +++ b/src/corelib/time/qcalendar.cpp @@ -36,6 +36,9 @@ #if QT_CONFIG(jalalicalendar) #include "qjalalicalendar_p.h" #endif +#if QT_CONFIG(islamiccivilcalendar) +#include "qislamiccivilcalendar_p.h" +#endif #include "qdatetime.h" #include "qcalendarmath_p.h" @@ -624,6 +627,10 @@ const QCalendarBackend *QCalendarBackend::fromEnum(QCalendar::System system) #if QT_CONFIG(jalalicalendar) case QCalendar::System::Jalali: return new QJalaliCalendar; +#endif +#if QT_CONFIG(islamiccivilcalendar) + case QCalendar::System::IslamicCivil: + return new QIslamicCivilCalendar; #else // When highest-numbered system isn't enabled, ensure we have a case for Last: case QCalendar::System::Last: #endif @@ -667,6 +674,7 @@ const QCalendarBackend *QCalendarBackend::fromEnum(QCalendar::System system) \value Julian An ancient Roman calendar with too few leap years. \value Milankovic A revised Julian calendar used by some Orthodox churches. \value Jalali The Solar Hijri calendar (also called Persian). + \value IslamicCivil The (tabular) Islamic Civil calendar. \sa QCalendar */ |