diff options
author | Oliver Wolff <oliver.wolff@theqtcompany.com> | 2015-09-21 14:23:10 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@theqtcompany.com> | 2015-09-24 07:34:03 +0000 |
commit | d53695501ac8fd8f99b9b1292dae41002ac6f3f2 (patch) | |
tree | 40652a1a5c00393ca68f5ca212356acce50895db /src/corelib/tools/qlocale_win.cpp | |
parent | c0c49b8df7a78736a4f2c41e3fd1737e94e2729f (diff) |
winphone: Obtain QLocale::uiLanguages properly
The methods are supported on Windows Phone since 8.1 so that the
simplified Windows Phone code isn't needed any more.
Task-number: QTBUG-48140
Change-Id: I21c488fe1a1322e85bbe088fb47e81893fd12d40
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Diffstat (limited to 'src/corelib/tools/qlocale_win.cpp')
-rw-r--r-- | src/corelib/tools/qlocale_win.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp index 1cad9b32e3..4781bab172 100644 --- a/src/corelib/tools/qlocale_win.cpp +++ b/src/corelib/tools/qlocale_win.cpp @@ -51,9 +51,7 @@ #include <wrl.h> #include <windows.foundation.h> #include <windows.foundation.collections.h> -#ifndef Q_OS_WINPHONE #include <windows.globalization.h> -#endif #endif // Q_OS_WINRT QT_BEGIN_NAMESPACE @@ -639,7 +637,6 @@ QVariant QSystemLocalePrivate::uiLanguages() return QStringList(QString::fromLatin1(winLangCodeToIsoName(GetUserDefaultUILanguage()))); #else // !Q_OS_WINRT QStringList result; -#ifndef Q_OS_WINPHONE ComPtr<ABI::Windows::Globalization::IApplicationLanguagesStatics> appLanguagesStatics; if (FAILED(GetActivationFactory(HString::MakeReference(RuntimeClass_Windows_Globalization_ApplicationLanguages).Get(), &appLanguagesStatics))) { qWarning("Could not obtain ApplicationLanguagesStatic"); @@ -661,9 +658,6 @@ QVariant QSystemLocalePrivate::uiLanguages() PCWSTR rawString = language.GetRawBuffer(&length); result << QString::fromWCharArray(rawString, length); } -#else // !Q_OS_WINPHONE - result << QString::fromWCharArray(lcName); -#endif // Q_OS_WINPHONE return result; #endif // Q_OS_WINRT |