From 31524cef8efe62af641dc39fb36220303e329d81 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 6 Sep 2023 16:49:31 +0200 Subject: [PATCH] Fix neglected wording about separators added in 6.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the documentation of the TagSeparator parameters of three QLocale methods, I neglected to mention they were added at 6.7. This amends commits 91e70f239e166956c0db2d99cfb229c6b7d94598 and 15cfdab514591a66ffa783e5d680926578b9d05b in which I added these parameters. Change-Id: I11462b88305255359d4e9b144b000cffe9a142ad Reviewed-by: Thiago Macieira Reviewed-by: Topi Reiniƶ --- src/corelib/text/qlocale.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index ff604d773c..16a0341a7e 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -1342,7 +1342,6 @@ QLocale::Country QLocale::country() const /*! \since 6.7 - \enum QLocale::TagSeparator Indicate how to combine the parts that make up a locale identifier. @@ -1380,8 +1379,9 @@ Q_DECL_COLD_FUNCTION static void badSeparatorWarning(const char *method, char se "language_territory", where language is a lowercase, two-letter ISO 639 language code, and territory is an uppercase, two- or three-letter ISO 3166 territory code. If the locale has no specified territory, only the language - name is returned. An optional \a separator parameter overrides the default - underscore character separating the two tags. + name is returned. Since Qt 6.7 an optional \a separator parameter can be + supplied to override the default underscore character separating the two + tags. Even if the QLocale object was constructed with an explicit script, name() will not contain it for compatibility reasons. Use \l bcp47Name() instead if @@ -1455,10 +1455,10 @@ T toIntegral_helper(const QLocalePrivate *d, QStringView str, bool *ok) user-interface should be in. This function tries to conform the locale name to the IETF Best Common - Practice 47, defined by RFC 5646. It supports an optional \a separator - parameter which can be used to override the BCP47-specified use of a hyphen - to separate the tags. For use in IETF-defined protocols, however, the - default, QLocale::TagSeparator::Dash, should be retained. + Practice 47, defined by RFC 5646. Since Qt 6.7, it supports an optional \a + separator parameter which can be used to override the BCP47-specified use of + a hyphen to separate the tags. For use in IETF-defined protocols, however, + the default, QLocale::TagSeparator::Dash, should be retained. \sa name(), language(), territory(), script(), uiLanguages() */ @@ -4653,7 +4653,7 @@ QString QLocale::formattedDataSize(qint64 bytes, int precision, DataSizeFormats Each entry in the returned list is the name of a locale suitable to the user's preferences for what to translate the UI into. Where a name in the list is composed of several tags, they are joined as indicated by \a - separator. + separator. Prior to Qt 6.7 a dash was used as separator. For example, using the default separator QLocale::TagSeparator::Dash, if the user has configured their system to use English as used in the USA, the list