From d53695501ac8fd8f99b9b1292dae41002ac6f3f2 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Mon, 21 Sep 2015 14:23:10 +0200 Subject: [PATCH] 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 Reviewed-by: Andrew Knight --- src/corelib/tools/qlocale_win.cpp | 6 ------ 1 file changed, 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 #include #include -#ifndef Q_OS_WINPHONE #include -#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 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