diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-28 19:45:35 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-31 19:20:43 +0100 |
commit | 6c4e0f2d2de5f877f698a0faa7bd0d027b7320c9 (patch) | |
tree | 6d7079cbef92387eae4652ede2c930e210c36293 /src/corelib/text/qlocale.h | |
parent | d6ba2ae441b56d13edf9acf1220b50eda5e093cd (diff) |
Deprecate QLocale::toTime() variants taking a calendar
The calendar is ignored, so adding these methods was a mistake.
[ChangeLog][QtCore][QLocale] Deprecated toTime() variants taking a
calendar. The calendar is ignored in time parsing.
Change-Id: I79fa994ce88f13fdb931163b447eb1a9ad655c09
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale.h')
-rw-r--r-- | src/corelib/text/qlocale.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/text/qlocale.h b/src/corelib/text/qlocale.h index 513e0f097b..0dc9e1bd00 100644 --- a/src/corelib/text/qlocale.h +++ b/src/corelib/text/qlocale.h @@ -1037,11 +1037,15 @@ public: QDateTime toDateTime(const QString &string, const QString &format) const; // Calendar-aware API QDate toDate(const QString &string, FormatType format, QCalendar cal) const; - QTime toTime(const QString &string, FormatType format, QCalendar cal) const; QDateTime toDateTime(const QString &string, FormatType format, QCalendar cal) const; QDate toDate(const QString &string, const QString &format, QCalendar cal) const; - QTime toTime(const QString &string, const QString &format, QCalendar cal) const; QDateTime toDateTime(const QString &string, const QString &format, QCalendar cal) const; +# if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Calendar is ignored when parsing times") + QTime toTime(const QString &string, FormatType format, QCalendar cal) const; + QT_DEPRECATED_X("Calendar is ignored when parsing times") + QTime toTime(const QString &string, const QString &format, QCalendar cal) const; +# endif // 5.15 #endif // ### Qt 6: We need to return QString from these function since |