summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-03-22 15:12:13 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2021-04-15 14:17:56 +0200
commitfad730b1641d803b5b0706837d840b80f94d4ecb (patch)
tree7e954b1a0079b48254362f9c5a6468a47b9856a6 /src/corelib
parent50a7eb8cf75a2f9cebde6d0d23c108e5e7f1870b (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/text/qlocale.h6
1 files 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);