summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-08-21 22:49:35 +0300
committerOrgad Shaneh <orgads@gmail.com>2016-08-23 14:52:31 +0000
commit449390c3a5f3a91e3895cbba0a583386e93366b7 (patch)
treeff44cd429b14c47605bc9d224677c668dd70e96b /src/corelib
parent3fa18bf8816ccbbdf43eed2759c9a223cec039e8 (diff)
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) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qlocale_win.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/tools/qlocale_win.cpp b/src/corelib/tools/qlocale_win.cpp
index a5eb7ec058..7faf36b089 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: