QDateTime: improve docs about invalid vs valid datetime relation
Extract the information about the relation between invalid and valid datetimes into a snippet, and include it in the documentation of every relational operator. Pick-to: 6.6 6.5 6.2 5.15 Change-Id: I61b239647efe928eb0758cfc5649b33ab4d06c7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
8f2828683e
commit
9e26f1da0b
@ -4717,9 +4717,11 @@ bool QDateTime::equals(const QDateTime &other) const
|
||||
|
||||
Returns \c true if \a lhs is the same as \a rhs; otherwise returns \c false.
|
||||
|
||||
//! [invalid-vs-valid-datetime]
|
||||
Two datetimes are different if either the date, the time, or the time zone
|
||||
components are different. Since 5.14, all invalid datetime are equal (and
|
||||
components are different. Since 5.14, all invalid datetimes are equal (and
|
||||
less than all valid datetimes).
|
||||
//! [invalid-vs-valid-datetime]
|
||||
|
||||
\sa operator!=(), operator<(), operator<=(), operator>(), operator>=()
|
||||
*/
|
||||
@ -4730,9 +4732,7 @@ bool QDateTime::equals(const QDateTime &other) const
|
||||
Returns \c true if \a lhs is different from \a rhs; otherwise returns \c
|
||||
false.
|
||||
|
||||
Two datetimes are different if either the date, the time, or the time zone
|
||||
components are different. Since 5.14, all invalid datetime are equal (and
|
||||
less than all valid datetimes).
|
||||
\include qdatetime.cpp invalid-vs-valid-datetime
|
||||
|
||||
\sa operator==()
|
||||
*/
|
||||
@ -4765,6 +4765,8 @@ bool QDateTime::precedes(const QDateTime &other) const
|
||||
Returns \c true if \a lhs is earlier than \a rhs;
|
||||
otherwise returns \c false.
|
||||
|
||||
\include qdatetime.cpp invalid-vs-valid-datetime
|
||||
|
||||
\sa operator==()
|
||||
*/
|
||||
|
||||
@ -4774,6 +4776,8 @@ bool QDateTime::precedes(const QDateTime &other) const
|
||||
Returns \c true if \a lhs is earlier than or equal to \a rhs; otherwise
|
||||
returns \c false.
|
||||
|
||||
\include qdatetime.cpp invalid-vs-valid-datetime
|
||||
|
||||
\sa operator==()
|
||||
*/
|
||||
|
||||
@ -4782,6 +4786,8 @@ bool QDateTime::precedes(const QDateTime &other) const
|
||||
|
||||
Returns \c true if \a lhs is later than \a rhs; otherwise returns \c false.
|
||||
|
||||
\include qdatetime.cpp invalid-vs-valid-datetime
|
||||
|
||||
\sa operator==()
|
||||
*/
|
||||
|
||||
@ -4791,6 +4797,8 @@ bool QDateTime::precedes(const QDateTime &other) const
|
||||
Returns \c true if \a lhs is later than or equal to \a rhs;
|
||||
otherwise returns \c false.
|
||||
|
||||
\include qdatetime.cpp invalid-vs-valid-datetime
|
||||
|
||||
\sa operator==()
|
||||
*/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user