diff options
author | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2016-03-15 13:04:50 +0100 |
---|---|---|
committer | Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> | 2016-03-16 10:30:26 +0000 |
commit | e7cd32274e144144c1630d65d09d24a1ae0af2d7 (patch) | |
tree | a4e2bec09d18059a92380a2c9733d8752c341484 /src/corelib/tools/qtimezone.cpp | |
parent | 7e72a5e11e92ed1df28ed34b13b711df6ca6fde2 (diff) |
WinRT: Fix QTimeZone transitions by switching backend
Previously WinRT was using the UTC backend which fails on all platforms
for some QDateTime autotests related to timezone items. Hence switch to
the Windows implementation for WinRT as well.
However, the windows backend does query the registry heavily, which is
not supported on WinRT. Instead use the API version provided by the SDK.
Long-term we might want to switch to this version on desktop windows as
well, as direct registry access would not be required and we could
harmonize the codepaths for both platforms.
Change-Id: I620b614e9994aa77b531e5c34c9be1da7e272a30
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Diffstat (limited to 'src/corelib/tools/qtimezone.cpp')
-rw-r--r-- | src/corelib/tools/qtimezone.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qtimezone.cpp b/src/corelib/tools/qtimezone.cpp index 333a5c3471..bf34a8b16f 100644 --- a/src/corelib/tools/qtimezone.cpp +++ b/src/corelib/tools/qtimezone.cpp @@ -61,7 +61,7 @@ static QTimeZonePrivate *newBackendTimeZone() #elif defined Q_OS_UNIX return new QTzTimeZonePrivate(); // Registry based timezone backend not available on WinRT -#elif defined Q_OS_WIN && !defined Q_OS_WINRT +#elif defined Q_OS_WIN return new QWinTimeZonePrivate(); #elif defined QT_USE_ICU return new QIcuTimeZonePrivate(); @@ -88,7 +88,7 @@ static QTimeZonePrivate *newBackendTimeZone(const QByteArray &ianaId) #elif defined Q_OS_UNIX return new QTzTimeZonePrivate(ianaId); // Registry based timezone backend not available on WinRT -#elif defined Q_OS_WIN && !defined Q_OS_WINRT +#elif defined Q_OS_WIN return new QWinTimeZonePrivate(ianaId); #elif defined QT_USE_ICU return new QIcuTimeZonePrivate(ianaId); |