summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qtextstream.cpp
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2012-03-26 17:23:21 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-24 16:37:11 +0200
commit0060b44d7045434583f14b5787211bafd045dd54 (patch)
tree7a515509cb1c904ada365e2e1aef4c6038f96e56 /src/corelib/io/qtextstream.cpp
parentfeb736ef27deb5afc4b8739b3f831b1a94004163 (diff)
QLocale: Clean up QLocalePrivate implementation
In Qt4 QLocalePrivate is a struct returned by a d() method. This will be unsuitable for the planned change to use ICU and may cause BIC issues. This change makes QLocalePrivate a class and creates a new struct QLocaleData to hold the data index. Further clean-ups are possible but are left for later. Change-Id: Ie316a07790f74674a3b520b735dff72695cc4060 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qtextstream.cpp')
-rw-r--r--src/corelib/io/qtextstream.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 73ffdfe0a4..ae40f777d8 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -2294,7 +2294,7 @@ void QTextStreamPrivate::putNumber(qulonglong number, bool negative)
if (locale != QLocale::c())
flags |= QLocalePrivate::ThousandsGroup;
- const QLocalePrivate *dd = locale.d();
+ const QLocalePrivate *dd = locale.d;
int base = integerBase ? integerBase : 10;
if (negative && base == 10) {
result = dd->longLongToString(-static_cast<qlonglong>(number), -1,
@@ -2503,7 +2503,7 @@ QTextStream &QTextStream::operator<<(double f)
if (numberFlags() & ForcePoint)
flags |= QLocalePrivate::Alternate;
- const QLocalePrivate *dd = d->locale.d();
+ const QLocalePrivate *dd = d->locale.d;
QString num = dd->doubleToString(f, d->realNumberPrecision, form, -1, flags);
d->putString(num, true);
return *this;