summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtimezone.cpp
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-01-30 16:04:23 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 22:21:19 +0200
commit9c2cbee2b1adedf53fa86a1c7a86f561747ab962 (patch)
treeeb67c1edec8712454272c0e972074f25270449d6 /src/corelib/tools/qtimezone.cpp
parent48e2c3ac3318d4e3b504aadad5f56dc33be8f50d (diff)
QTimeZone - Add ICU support
Add ICU backend for QTimeZone Change-Id: I92e53a848477e366591102064b093e936f0b49d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qtimezone.cpp')
-rw-r--r--src/corelib/tools/qtimezone.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp
index a739d9c69f..53fd3fb0bf 100644
--- a/src/corelib/tools/qtimezone.cpp
+++ b/src/corelib/tools/qtimezone.cpp
@@ -52,13 +52,21 @@ QT_BEGIN_NAMESPACE
// Create default time zone using appropriate backend
static QTimeZonePrivate *newBackendTimeZone()
{
+#if defined QT_USE_ICU
+ return new QIcuTimeZonePrivate();
+#else
return new QUtcTimeZonePrivate();
+#endif // QT_USE_ICU
}
// Create named time zone using appropriate backend
static QTimeZonePrivate *newBackendTimeZone(const QByteArray &olsenId)
{
+#if defined QT_USE_ICU
+ return new QIcuTimeZonePrivate(olsenId);
+#else
return new QUtcTimeZonePrivate(olsenId);
+#endif // QT_USE_ICU
}
class QTimeZoneSingleton