From 4a7630085429248f47b3fca1365d928a058a6bad Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Mon, 23 Sep 2013 14:05:54 +0200 Subject: [PATCH] WinRT: Use UtcTimeZone instead of QWinTimeZone backend As registry access isn't possible on WinRT it cannot use QWinTimeZone as backend. Instead it uses QUtcTimeZone. Change-Id: I51c59a187e3da6e957d0b3f6376069d55c9fc2ec Reviewed-by: Andrew Knight Reviewed-by: John Layt --- src/corelib/tools/qtimezone.cpp | 6 ++++-- src/corelib/tools/tools.pri | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp index cdd0aba102..890798b421 100644 --- a/src/corelib/tools/qtimezone.cpp +++ b/src/corelib/tools/qtimezone.cpp @@ -65,7 +65,8 @@ static QTimeZonePrivate *newBackendTimeZone() return new QMacTimeZonePrivate(); #elif defined Q_OS_UNIX return new QTzTimeZonePrivate(); -#elif defined Q_OS_WIN + // Registry based timezone backend not available on WinRT +#elif defined Q_OS_WIN && !defined Q_OS_WINRT return new QWinTimeZonePrivate(); #elif defined QT_USE_ICU return new QIcuTimeZonePrivate(); @@ -89,7 +90,8 @@ static QTimeZonePrivate *newBackendTimeZone(const QByteArray &olsenId) return new QMacTimeZonePrivate(olsenId); #elif defined Q_OS_UNIX return new QTzTimeZonePrivate(olsenId); -#elif defined Q_OS_WIN + // Registry based timezone backend not available on WinRT +#elif defined Q_OS_WIN && !defined Q_OS_WINRT return new QWinTimeZonePrivate(olsenId); #elif defined QT_USE_ICU return new QIcuTimeZonePrivate(olsenId); diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index e043a4cd15..a645961236 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -124,8 +124,10 @@ else:blackberry { HEADERS += tools/qlocale_blackberry.h } else:unix:SOURCES += tools/qelapsedtimer_unix.cpp tools/qlocale_unix.cpp tools/qtimezoneprivate_tz.cpp -else:win32:SOURCES += tools/qelapsedtimer_win.cpp tools/qlocale_win.cpp tools/qtimezoneprivate_win.cpp -else:integrity:SOURCES += tools/qelapsedtimer_unix.cpp tools/qlocale_unix.cpp +else:win32 { + SOURCES += tools/qelapsedtimer_win.cpp tools/qlocale_win.cpp + !winrt: SOURCES += tools/qtimezoneprivate_win.cpp +} else:integrity:SOURCES += tools/qelapsedtimer_unix.cpp tools/qlocale_unix.cpp else:SOURCES += tools/qelapsedtimer_generic.cpp contains(QT_CONFIG, zlib) {