diff options
Diffstat (limited to 'src/corelib/tools/qtimezone.cpp')
-rw-r--r-- | src/corelib/tools/qtimezone.cpp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp index 53fd3fb0bf..9de9e5de8b 100644 --- a/src/corelib/tools/qtimezone.cpp +++ b/src/corelib/tools/qtimezone.cpp @@ -52,21 +52,41 @@ QT_BEGIN_NAMESPACE // Create default time zone using appropriate backend static QTimeZonePrivate *newBackendTimeZone() { -#if defined QT_USE_ICU +#ifdef QT_NO_SYSTEMLOCALE +#ifdef QT_USE_ICU return new QIcuTimeZonePrivate(); #else return new QUtcTimeZonePrivate(); #endif // QT_USE_ICU +#else +#if defined Q_OS_UNIX && !defined Q_OS_MAC + return new QTzTimeZonePrivate(); +#elif defined QT_USE_ICU + return new QIcuTimeZonePrivate(); +#else + return new QUtcTimeZonePrivate(); +#endif // System Locales +#endif // QT_NO_SYSTEMLOCALE } // Create named time zone using appropriate backend static QTimeZonePrivate *newBackendTimeZone(const QByteArray &olsenId) { -#if defined QT_USE_ICU +#ifdef QT_NO_SYSTEMLOCALE +#ifdef QT_USE_ICU return new QIcuTimeZonePrivate(olsenId); #else return new QUtcTimeZonePrivate(olsenId); #endif // QT_USE_ICU +#else +#if defined Q_OS_UNIX && !defined Q_OS_MAC + return new QTzTimeZonePrivate(olsenId); +#elif defined QT_USE_ICU + return new QIcuTimeZonePrivate(olsenId); +#else + return new QUtcTimeZonePrivate(olsenId); +#endif // System Locales +#endif // QT_NO_SYSTEMLOCALE } class QTimeZoneSingleton |