summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
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/corelib/kernel
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/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcore_symbian_p.h3
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp10
-rw-r--r--src/corelib/kernel/qcoreapplication.h4
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h4
4 files changed, 20 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcore_symbian_p.h b/src/corelib/kernel/qcore_symbian_p.h
index f86bfd3..2ef48b5 100644
--- a/src/corelib/kernel/qcore_symbian_p.h
+++ b/src/corelib/kernel/qcore_symbian_p.h
@@ -139,7 +139,8 @@ enum S60PluginFuncOrdinals
S60Plugin_GetLongDateFormatSpec = 3,
S60Plugin_GetShortDateFormatSpec = 4,
S60Plugin_LocalizedDirectoryName = 5,
- S60Plugin_GetSystemDrive = 6
+ S60Plugin_GetSystemDrive = 6,
+ S60Plugin_RefreshLocaleInfo = 7
};
Q_CORE_EXPORT TLibraryFunction qt_resolveS60PluginFunc(int ordinal);
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 8a55bad..93df45d 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -69,6 +69,7 @@
# include <f32file.h>
# include "qeventdispatcher_symbian_p.h"
# include "private/qcore_symbian_p.h"
+# include "private/qlocale_p.h"
#elif defined(Q_OS_UNIX)
# if !defined(QT_NO_GLIB)
# include "qeventdispatcher_glib_p.h"
@@ -2601,4 +2602,13 @@ int QCoreApplication::loopLevel()
\sa Q_OBJECT, QObject::tr(), QObject::trUtf8()
*/
+#if defined(Q_OS_SYMBIAN)
+void QCoreApplicationPrivate::_q_symbianRegisterLocaleNotifier()
+{
+ QLocalePrivate::symbianRegisterLocaleNotifier();
+}
+#endif
+
QT_END_NAMESPACE
+
+#include "moc_qcoreapplication.cpp"
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index 097b8b4..152a775 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -196,6 +196,10 @@ private:
static QCoreApplication *self;
+#if defined(Q_OS_SYMBIAN)
+ Q_PRIVATE_SLOT(d_func(), void _q_symbianRegisterLocaleNotifier())
+#endif
+
Q_DISABLE_COPY(QCoreApplication)
friend class QEventDispatcherUNIXPrivate;
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index bf43f88..39e50c4 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -122,6 +122,10 @@ public:
static uint attribs;
static inline bool testAttribute(uint flag) { return attribs & (1 << flag); }
+
+#if defined(Q_OS_SYMBIAN)
+ void _q_symbianRegisterLocaleNotifier();
+#endif
};
QT_END_NAMESPACE