diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-22 16:12:24 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-31 19:20:43 +0100 |
commit | d6d98f782aeb798649c2bf5f7744065b7e86c035 (patch) | |
tree | 8f05dd4cd59bcc73d5023205109755a5cff5387c /src/corelib/global/qnamespace.h | |
parent | 05ce1821cd18e745f7d126ed93ab0c68125993b6 (diff) |
Deprecate locale-related DateFormat enum members
Qt 6 shall remove all locale-dependence from Q(Date|Time)+.
Task-number: QTBUG-80441
Change-Id: Iebaaa2bd776bccfe0d73c15f36cbdd456b71ca59
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/global/qnamespace.h')
-rw-r--r-- | src/corelib/global/qnamespace.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 8f40393a7e..ea2c635303 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtCore module of the Qt Toolkit. @@ -1267,14 +1267,16 @@ public: enum DateFormat { TextDate, // default Qt ISODate, // ISO 8601 - SystemLocaleDate, // deprecated - LocalDate = SystemLocaleDate, // deprecated - LocaleDate, // deprecated - SystemLocaleShortDate, - SystemLocaleLongDate, - DefaultLocaleShortDate, - DefaultLocaleLongDate, - RFC2822Date, // RFC 2822 (+ 850 and 1036 during parsing) +#if QT_DEPRECATED_SINCE(5, 15) + SystemLocaleDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"), + LocalDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale") = 2, // i.e. SystemLocaleDate + LocaleDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"), + SystemLocaleShortDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"), + SystemLocaleLongDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"), + DefaultLocaleShortDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"), + DefaultLocaleLongDate Q_DECL_ENUMERATOR_DEPRECATED_X("Use QLocale"), +#endif + RFC2822Date = 8, // RFC 2822 (+ 850 and 1036 during parsing) ISODateWithMs }; |