diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-20 10:52:58 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-20 10:52:58 (GMT) |
commit | 40a2129c60f21ea6f146d405ebcadb25628db273 (patch) | |
tree | 1a61e8ab7cc90c698c4def62439a2acc0cec6bad /src/corelib/tools/qlocale.cpp | |
parent | 8485052e3991aebf7c823b3e80fc06ccf9f08991 (diff) | |
parent | 7a9ed6a1983e318bfb14f0b2db41b3a4e1415529 (diff) | |
download | Qt-40a2129c60f21ea6f146d405ebcadb25628db273.zip Qt-40a2129c60f21ea6f146d405ebcadb25628db273.tar.gz Qt-40a2129c60f21ea6f146d405ebcadb25628db273.tar.bz2 |
Merge remote-tracking branch 'earth-team/master' into earth-staging-master
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index d986b9b..5c4085a 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -86,6 +86,10 @@ static QLocalePrivate *system_lp = 0; Q_GLOBAL_STATIC(QLocalePrivate, globalLocalePrivate) #endif +#ifdef QT_USE_ICU +extern bool qt_initIcu(const QString &localeName); +#endif + /****************************************************************************** ** Helpers for accessing Qt locale database */ @@ -520,6 +524,12 @@ void QLocalePrivate::updateSystemPrivate() res = sys_locale->query(QSystemLocale::PositiveSign, QVariant()); if (!res.isNull()) system_lp->m_plus = res.toString().at(0).unicode(); + +#ifdef QT_USE_ICU + if (!default_lp) + qt_initIcu(system_lp->bcp47Name()); +#endif + } #endif @@ -879,6 +889,10 @@ void QLocale::setDefault(const QLocale &locale) { default_lp = locale.d(); default_number_options = locale.numberOptions(); + +#ifdef QT_USE_ICU + qt_initIcu(locale.bcp47Name()); +#endif } /*! |