summaryrefslogtreecommitdiffstats
path: root/src/plugins/s60
diff options
context:
space:
mode:
authordka <darpan.k-a@nokia.com>2009-10-12 13:25:23 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-12-15 09:36:33 (GMT)
commit44f7c1e097582a704a06ccbbf516536b88ddcd3a (patch)
tree1444e29341ecd5d02d78ee66bd056f432680fed0 /src/plugins/s60
parent1f4a4cca0067b1d4a9784f00e41c3fc1aca1f712 (diff)
downloadQt-44f7c1e097582a704a06ccbbf516536b88ddcd3a.zip
Qt-44f7c1e097582a704a06ccbbf516536b88ddcd3a.tar.gz
Qt-44f7c1e097582a704a06ccbbf516536b88ddcd3a.tar.bz2
Changes to support locale change event for symbian platform
Subscribing to the locale change notification to be able to update the system locale whenever the user changes the current system locale. Also changed the initialization of the system locale to make construction of the QLocale object as lightweight as possible. So now the default contructor just creates a QLocale and QSystemLocale objects, but doesn't try to fill the cache in the latter with data from the system and postpones it until it is actually requested (most applications create QLocale objects on the stack and might not even use the data from the system locale, so we don't need to initialize system locale right away). Modified-by: axis Modified-by: Denis Dzyubenko Reviewed-by: Denis Dzyubenko Reviewed-by: axis
Diffstat (limited to 'src/plugins/s60')
-rw-r--r--src/plugins/s60/src/qlocale_3_1.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/s60/src/qlocale_3_1.cpp b/src/plugins/s60/src/qlocale_3_1.cpp
index beeee7f..d597861 100644
--- a/src/plugins/s60/src/qlocale_3_1.cpp
+++ b/src/plugins/s60/src/qlocale_3_1.cpp
@@ -50,6 +50,7 @@ _LIT(KLocaleIndependent, "%F");
static TBuf<10> dateFormat;
static TBuf<10> timeFormat;
+#define _DEBUG
static void initialiseDateFormat()
{
if(dateFormat.Length())
@@ -146,3 +147,10 @@ EXPORT_C TPtrC defaultGetShortDateFormatSpec(TExtendedLocale&)
initialiseDateFormat();
return TPtrC(dateFormat);
}
+
+EXPORT_C void refreshLocaleInfo()
+{
+ // clear the buffers, so next time we re-read data from the system.
+ dateFormat.Zero();
+ timeFormat.Zero();
+}