diff options
author | Edward Welbourne <[email protected]> | 2025-03-27 12:01:04 +0100 |
---|---|---|
committer | Edward Welbourne <[email protected]> | 2025-03-28 17:03:24 +0100 |
commit | 8c943392ae2ae554e496f11d9a3dd6c2c2e762e3 (patch) | |
tree | e07626aa8814f42d59c6de6e32eceeac1f640674 | |
parent | b1ed5f656f064e553b33752f8e87d2f5b9553e38 (diff) |
Purge dangling uses of QDateTime deprecated time-spec changes
QDateTime::{to,set}TimeSpec and QTimeZone::setOffsetFromUtc()
shouldn't be referenced in docs aside from their own; they are
deprecated from 6.9.
Fixes: QTBUG-135238
Pick-to: 6.9.0 6.9 6.8
Change-Id: I835cfaa888dd3079f96719cd1c413dc7c2796fdb
Reviewed-by: Magdalena Stojek <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_time_qdatetime.cpp | 2 | ||||
-rw-r--r-- | src/corelib/time/qdatetime.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_time_qdatetime.cpp b/src/corelib/doc/snippets/code/src_corelib_time_qdatetime.cpp index 05fbf042ec8..de41965b192 100644 --- a/src/corelib/doc/snippets/code/src_corelib_time_qdatetime.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_time_qdatetime.cpp @@ -172,7 +172,7 @@ QDate lastMonday = 2020y / January / Monday[last]; //! [23] QDateTime local(QDateTime::currentDateTime()); -QDateTime UTC(local.toTimeSpec(QTimeZone::UTC)); +QDateTime UTC(local.toTimeZone(QTimeZone::UTC)); qDebug() << "Local time is:" << local; qDebug() << "UTC time is:" << UTC; qDebug() << "No difference between times represented:" << local.secsTo(UTC); diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp index 6a11b101120..5c3c88e92ee 100644 --- a/src/corelib/time/qdatetime.cpp +++ b/src/corelib/time/qdatetime.cpp @@ -4147,7 +4147,7 @@ QTime QDateTime::time() const details of that time zone). Equivalent to \c{timeRepresentation().timeSpec()}. - \sa setTimeSpec(), timeRepresentation(), date(), time() + \sa setTimeZone(), timeRepresentation(), date(), time() */ Qt::TimeSpec QDateTime::timeSpec() const @@ -5330,7 +5330,7 @@ Qt::weak_ordering compareThreeWay(const QDateTime &lhs, const QDateTime &rhs) Returns the system clock's current datetime, using the time representation described by \a zone. If \a zone is omitted, local time is used. - \sa currentDateTimeUtc(), QDate::currentDate(), QTime::currentTime(), toTimeSpec() + \sa currentDateTimeUtc(), QDate::currentDate(), QTime::currentTime(), toTimeZone() */ /*! @@ -5349,7 +5349,7 @@ QDateTime QDateTime::currentDateTime() Equivalent to \c{currentDateTime(QTimeZone::UTC)}. - \sa currentDateTime(), QDate::currentDate(), QTime::currentTime(), toTimeSpec() + \sa currentDateTime(), QDate::currentDate(), QTime::currentTime(), toTimeZone() */ QDateTime QDateTime::currentDateTimeUtc() @@ -5366,7 +5366,7 @@ QDateTime QDateTime::currentDateTimeUtc() This number is like the POSIX time_t variable, but expressed in milliseconds instead of seconds. - \sa currentDateTime(), currentDateTimeUtc(), toTimeSpec() + \sa currentDateTime(), currentDateTimeUtc(), toTimeZone() */ /*! |