diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-11-12 11:30:01 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-11-17 19:55:04 +0100 |
commit | 17701a95f8612865191f7719df1879c4114d8f6c (patch) | |
tree | 42ad4ef8b9c816cb2a0a6d4e897cf26432b5f94e /src/corelib/text/qlocale.cpp | |
parent | 7c28fa7717b4bad67a4d1795cb79dc4160925694 (diff) |
QLocale: simplify currency display name lookup
We were extracting several candidate display names from CLDR for each
currency, joining them with semicolons, storing in a table, then using
only the first entry from the list - where we should probably have
used the first non-empty entry in any case.
So instead extract the first non-empty candidate name from CLDR and
store that simply, saving the need for semicolon-joining or parsing
out the first entry from the thus-joined list. This significantly
reduces the size of the currency name data table.
Change-Id: I201d0528348d5fcb9eceb5df86211b9c77de3485
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale.cpp')
-rw-r--r-- | src/corelib/text/qlocale.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index 4b21c4cd15..3b7d4811e1 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -3957,7 +3957,7 @@ QString QLocale::currencySymbol(QLocale::CurrencySymbolFormat format) const case CurrencySymbol: return d->m_data->currencySymbol().getData(currency_symbol_data); case CurrencyDisplayName: - return d->m_data->currencyDisplayName().getListEntry(currency_display_name_data, 0); + return d->m_data->currencyDisplayName().getData(currency_display_name_data); case CurrencyIsoCode: { const char *code = d->m_data->m_currency_iso_code; if (auto len = qstrnlen(code, 3)) |