diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-03-07 16:05:08 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-03-17 16:38:02 (GMT) |
commit | bb86e77cc437b92d49692bb7026c57626d77079f (patch) | |
tree | 95e590f98e8f905426f0eeaf4c4673c2cfdef6cc /src/corelib/tools/qlocale.cpp | |
parent | 0ddf35198fa789c4c1b479e09241fff850a08442 (diff) | |
download | Qt-bb86e77cc437b92d49692bb7026c57626d77079f.zip Qt-bb86e77cc437b92d49692bb7026c57626d77079f.tar.gz Qt-bb86e77cc437b92d49692bb7026c57626d77079f.tar.bz2 |
Refactored QLocale on Windows.
Added LocaleChanged system locale enum that is queried whenever we detect that
the system locale is changed. This should make it easier to have cached values
in the system locale implementations.
Reviewed-by: Zeno Albisser
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 4c0b154..31cf85b 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -477,6 +477,10 @@ void QLocalePrivate::updateSystemPrivate() const QSystemLocale *sys_locale = systemLocale(); if (!system_lp) system_lp = globalLocalePrivate(); + + // tell the object that the system locale has changed. + sys_locale->query(QSystemLocale::LocaleChanged, QVariant()); + *system_lp = *sys_locale->fallbackLocale().d(); #if defined(Q_OS_SYMBIAN) |