diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-06-30 23:24:46 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2014-07-24 01:57:32 +0200 |
commit | 4fcd5a3da9ae47d158c42b7b5ad1cde15c406579 (patch) | |
tree | 1fb21bfd091d6b9e8ceeb03d228cd5be51e02865 /src | |
parent | 46a0a87b2a394a60246764808a91e1f5c09d721a (diff) |
Make QTextStream respect QLocale with OmitGroupSeparators
The default in QTextStream is to use the C locale, so default
QTextStream are not affected. When you set a QLocale on it, the default
was to use group separators (which is the QLocale default too). This
commit makes QTextStream respect a QLocale in which the
OmitGroupSeparators option had been set.
Task-number: QTBUG-39956
Change-Id: I00fbe12fca7f0287c7217deb487ded6582a03b52
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qtextstream.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 24c22117fa..4002ce8694 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -2203,7 +2203,7 @@ void QTextStreamPrivate::putNumber(qulonglong number, bool negative) // add thousands group separators. For backward compatibility we // don't add a group separator for C locale. - if (locale != QLocale::c()) + if (locale != QLocale::c() && !locale.numberOptions().testFlag(QLocale::OmitGroupSeparator)) flags |= QLocaleData::ThousandsGroup; const QLocaleData *dd = locale.d->m_data; |