diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2012-11-23 11:45:01 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-23 22:58:59 +0100 |
commit | 3c0ac5208111c85c405ba1ee6ce3189a6c4e1236 (patch) | |
tree | 18ed197d3e40115282534c688aa1a361467f76bc /src/corelib/tools | |
parent | 86bbe5a43a568b9d0136f8e72f3842419ae39ab2 (diff) |
QLocale: Fix toCurrencyString() didn't respect group separator option
Change-Id: Icda43d71d600d77fe1ed4fcde1ef4478ef29c1d5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 2f0e4970b0..c49b3e0fff 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -3253,7 +3253,7 @@ QString QLocale::toCurrencyString(qlonglong value, const QString &symbol) const size = d->m_data->m_currency_negative_format_size; value = -value; } - QString str = d->longLongToString(value); + QString str = toString(value); QString sym = symbol.isNull() ? currencySymbol() : symbol; if (sym.isEmpty()) sym = currencySymbol(QLocale::CurrencyIsoCode); @@ -3278,7 +3278,7 @@ QString QLocale::toCurrencyString(qulonglong value, const QString &symbol) const const QLocaleData *data = this->d->m_data; quint8 idx = data->m_currency_format_idx; quint8 size = data->m_currency_format_size; - QString str = d->unsLongLongToString(value); + QString str = toString(value); QString sym = symbol.isNull() ? currencySymbol() : symbol; if (sym.isEmpty()) sym = currencySymbol(QLocale::CurrencyIsoCode); @@ -3308,8 +3308,7 @@ QString QLocale::toCurrencyString(double value, const QString &symbol) const size = data->m_currency_negative_format_size; value = -value; } - QString str = d->doubleToString(value, d->m_data->m_currency_digits, - QLocalePrivate::DFDecimal); + QString str = toString(value, 'f', d->m_data->m_currency_digits); QString sym = symbol.isNull() ? currencySymbol() : symbol; if (sym.isEmpty()) sym = currencySymbol(QLocale::CurrencyIsoCode); |