From fad730b1641d803b5b0706837d840b80f94d4ecb Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 22 Mar 2021 15:12:13 +0100 Subject: [PATCH] Make script and territory optional in QLocale constructors Previously the (language, territory) constructor had optional territory; however, the (language, script, territory) one required all three. Making the latter's script and territory optional, while requiring the former to pass territory, makes it possible to construct with (language), with (language, territory), with (language, script) or with (language, script, territory), without (overt) use of AnyScrit or AnyTerritory. Change-Id: Iaf6e46c473042d886eee7068515f9e41a704c2e7 Reviewed-by: Thiago Macieira --- src/corelib/text/qlocale.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/text/qlocale.h b/src/corelib/text/qlocale.h index 397cd396c9..59a7339c24 100644 --- a/src/corelib/text/qlocale.h +++ b/src/corelib/text/qlocale.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2020 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -926,8 +926,8 @@ public: QLocale(); explicit QLocale(const QString &name); - QLocale(Language language, Territory territory = AnyTerritory); - QLocale(Language language, Script script, Territory territory); + QLocale(Language language, Territory territory); + QLocale(Language language, Script script = AnyScript, Territory territory = AnyTerritory); QLocale(const QLocale &other); QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QLocale) QLocale &operator=(const QLocale &other);