From 449390c3a5f3a91e3895cbba0a583386e93366b7 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 21 Aug 2016 22:49:35 +0300 Subject: [PATCH] Revert "QLocale: Actually get the language script for the system locale" The text direction should *not* be set by the default script, but by the UI direction. For example, if the default script is Hebrew, but the UI is in English, it doesn't make sense to default all the controls to RTL. This should be done only if the UI is RTL. This reverts commit a90869861cbc9927af2bbab5a94630e47b33fd5c. Task-number: QTBUG-53110 Change-Id: I5a6951ac30f24eec86bc0ae2a9fcfe14eb3a8e28 Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Thiago Macieira --- src/corelib/tools/qlocale_win.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp index a5eb7ec0589..7faf36b0892 100644 --- a/src/corelib/tools/qlocale_win.cpp +++ b/src/corelib/tools/qlocale_win.cpp @@ -841,7 +841,6 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const case ZeroDigit: return d->zeroDigit(); case LanguageId: - case ScriptId: case CountryId: { QString locale = QString::fromLatin1(getWinLocaleName()); QLocale::Language lang; @@ -850,12 +849,12 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const QLocalePrivate::getLangAndCountry(locale, lang, script, cntry); if (type == LanguageId) return lang; - if (type == ScriptId) - return script == QLocale::AnyScript ? fallbackUiLocale().script() : script; if (cntry == QLocale::AnyCountry) return fallbackUiLocale().country(); return cntry; } + case ScriptId: + return QVariant(QLocale::AnyScript); case MeasurementSystem: return d->measurementSystem(); case AMText: