diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-11-25 15:04:24 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-12-05 23:04:13 +0100 |
commit | 396fa0fcd9e286d7d2dbee6fb9d158eb198773a1 (patch) | |
tree | 69e77bd9a07ed166e89d7b7725875a133436ff2e /src/corelib | |
parent | 7a1e444735954752879d77bf9153b41cd5e18c52 (diff) |
QDateTime::fromM?SecsSinceEpoch() docs: add missing note
The spec+offset overloads include a note about times outside the
supported range; however, this was missing for the time-zone
overloads. Also label all four as \overload.
Change-Id: I371ea8ff7d2fb26f679a078a1d8b5d70a6131c35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/time/qdatetime.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp index 7e9a16acf5..caf37dc439 100644 --- a/src/corelib/time/qdatetime.cpp +++ b/src/corelib/time/qdatetime.cpp @@ -4801,6 +4801,8 @@ qint64 QDateTime::currentSecsSinceEpoch() noexcept #endif /*! + \overload + Returns a datetime representing a moment the given number \a msecs of milliseconds after the start, in UTC, of the year 1970, described as specified by \a spec and \a offsetSeconds. @@ -4828,6 +4830,7 @@ QDateTime QDateTime::fromMSecsSinceEpoch(qint64 msecs, Qt::TimeSpec spec, int of /*! \since 5.8 + \overload Returns a datetime representing a moment the given number \a secs of seconds after the start, in UTC, of the year 1970, described as specified by \a spec @@ -4857,11 +4860,16 @@ QDateTime QDateTime::fromSecsSinceEpoch(qint64 secs, Qt::TimeSpec spec, int offs #if QT_CONFIG(timezone) /*! \since 5.2 + \overload Returns a datetime representing a moment the given number \a msecs of milliseconds after the start, in UTC, of the year 1970, described as specified by \a timeZone. + Note that there are possible values for \a msecs that lie outside the valid + range of QDateTime, both negative and positive. The behavior of this + function is undefined for those values. + \sa fromSecsSinceEpoch(), toMSecsSinceEpoch(), setMSecsSinceEpoch() */ QDateTime QDateTime::fromMSecsSinceEpoch(qint64 msecs, const QTimeZone &timeZone) @@ -4875,11 +4883,16 @@ QDateTime QDateTime::fromMSecsSinceEpoch(qint64 msecs, const QTimeZone &timeZone /*! \since 5.8 + \overload Returns a datetime representing a moment the given number \a secs of seconds after the start, in UTC, of the year 1970, described as specified by \a timeZone. + Note that there are possible values for \a secs that lie outside the valid + range of QDateTime, both negative and positive. The behavior of this + function is undefined for those values. + \sa fromMSecsSinceEpoch(), toSecsSinceEpoch(), setSecsSinceEpoch() */ QDateTime QDateTime::fromSecsSinceEpoch(qint64 secs, const QTimeZone &timeZone) |