diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2023-08-08 17:34:10 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-08-18 18:39:14 +0200 |
commit | 15cfdab514591a66ffa783e5d680926578b9d05b (patch) | |
tree | dcbbd9a925408d840680c9d790d0e49c541f6f2e /src/corelib/compat | |
parent | 820eff05f4ea934e11382ab32e318cb1fdd6954c (diff) |
Give QLocale's name() and bcp47Name() separator parameters
Previously name() has always used underscore and bcp47Name() dash; let
the user chose which one best fits their needs.
[ChangeLog][QtCore][QLocale] QLocale's name() and bcp47Name() now let
the caller chose what separator to use between the tags making up the
name, where there is more than one.
Change-Id: Ia689e6a3fb581b42905e7fb1ae7a7b688244d267
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/compat')
-rw-r--r-- | src/corelib/compat/removed_api.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index 28207d26d5..088b418aef 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -625,6 +625,16 @@ QStringList QLocale::uiLanguages() const return uiLanguages(TagSeparator::Dash); } +QString QLocale::name() const +{ + return name(TagSeparator::Underscore); +} + +QString QLocale::bcp47Name() const +{ + return bcp47Name(TagSeparator::Dash); +} + #include "qurl.h" QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode) |