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/text/qlocale.h | |
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/text/qlocale.h')
-rw-r--r-- | src/corelib/text/qlocale.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/text/qlocale.h b/src/corelib/text/qlocale.h index ca437ed92d..18e5a71cf7 100644 --- a/src/corelib/text/qlocale.h +++ b/src/corelib/text/qlocale.h @@ -926,9 +926,14 @@ public: QT_DEPRECATED_VERSION_X_6_6("Use territory() instead") Country country() const; #endif - QString name() const; +#if QT_CORE_REMOVED_SINCE(6, 7) + QString name() const; QString bcp47Name() const; +#endif + QString name(TagSeparator separator = TagSeparator::Underscore) const; + QString bcp47Name(TagSeparator separator = TagSeparator::Dash) const; + QString nativeLanguageName() const; QString nativeTerritoryName() const; #if QT_DEPRECATED_SINCE(6, 6) |