From 79aadd0c44b4f3027d0551faf9c2e678aa0b6b2b Mon Sep 17 00:00:00 2001
From: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Date: Wed, 17 Mar 2010 21:34:25 +0100
Subject: [PATCH] tmp
---
src/corelib/tools/qlocale.cpp | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 4f8d68c..587e802 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@@@ -4059,6 +4059,10 @@ QString QLocalePrivate::doubleToString(double d,
int width,
unsigned flags) const
{
+#ifndef QT_NO_SYSTEMLOCALE
+ if (isUninitializedSystemLocale())
+ QLocalePrivate::updateSystemPrivate();
+#endif
if (precision == -1)
precision = 6;
if (width == -1)
@@@@ -4209,6 +4213,10 @@ QString QLocalePrivate::longLongToString(qlonglong l, int precision,
int base, int width,
unsigned flags) const
{
+#ifndef QT_NO_SYSTEMLOCALE
+ if (isUninitializedSystemLocale())
+ QLocalePrivate::updateSystemPrivate();
+#endif
bool precision_not_specified = false;
if (precision == -1) {
precision_not_specified = true;
@@@@ -4294,6 +4302,10 @@ QString QLocalePrivate::unsLongLongToString(qulonglong l, int precision,
int base, int width,
unsigned flags) const
{
+#ifndef QT_NO_SYSTEMLOCALE
+ if (isUninitializedSystemLocale())
+ QLocalePrivate::updateSystemPrivate();
+#endif
bool precision_not_specified = false;
if (precision == -1) {
precision_not_specified = true;
@@@@ -4496,6 +4508,10 @@ bool QLocalePrivate::numberToCLocale(const QString &num,
bool QLocalePrivate::validateChars(const QString &str, NumberMode numMode, QByteArray *buff,
int decDigits) const
{
+#ifndef QT_NO_SYSTEMLOCALE
+ if (isUninitializedSystemLocale())
+ QLocalePrivate::updateSystemPrivate();
+#endif
buff->clear();
buff->reserve(str.length());
@@@@ -4589,6 +4605,10 @@ bool QLocalePrivate::validateChars(const QString &str, NumberMode numMode, QByte
double QLocalePrivate::stringToDouble(const QString &number, bool *ok,
GroupSeparatorMode group_sep_mode) const
{
+#ifndef QT_NO_SYSTEMLOCALE
+ if (isUninitializedSystemLocale())
+ QLocalePrivate::updateSystemPrivate();
+#endif
CharBuff buff;
if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
group_sep_mode, &buff)) {
@@@@ -4602,6 +4622,10 @@ double QLocalePrivate::stringToDouble(const QString &number, bool *ok,
qlonglong QLocalePrivate::stringToLongLong(const QString &number, int base,
bool *ok, GroupSeparatorMode group_sep_mode) const
{
+#ifndef QT_NO_SYSTEMLOCALE
+ if (isUninitializedSystemLocale())
+ QLocalePrivate::updateSystemPrivate();
+#endif
CharBuff buff;
if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
group_sep_mode, &buff)) {
@@@@ -4616,6 +4640,10 @@ qlonglong QLocalePrivate::stringToLongLong(const QString &number, int base,
qulonglong QLocalePrivate::stringToUnsLongLong(const QString &number, int base,
bool *ok, GroupSeparatorMode group_sep_mode) const
{
+#ifndef QT_NO_SYSTEMLOCALE
+ if (isUninitializedSystemLocale())
+ QLocalePrivate::updateSystemPrivate();
+#endif
CharBuff buff;
if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
group_sep_mode, &buff)) {
--
1.6.2.1.307.g91408