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>
bb10
Edward Welbourne 2022-11-25 15:04:24 +01:00
parent 7a1e444735
commit 396fa0fcd9
1 changed files with 13 additions and 0 deletions

View File

@ -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)