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.5 6.2 5.15 Change-Id: I61b239647efe928eb0758cfc5649b33ab4d06c7d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 9e26f1da0b0dedf7ee6d860b7c11a27b0b554866) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
abb26af834
commit
90c65ca197
@ -4694,9 +4694,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>=()
|
||||
*/
|
||||
@ -4707,9 +4709,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==()
|
||||
*/
|
||||
@ -4742,6 +4742,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==()
|
||||
*/
|
||||
|
||||
@ -4751,6 +4753,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==()
|
||||
*/
|
||||
|
||||
@ -4759,6 +4763,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==()
|
||||
*/
|
||||
|
||||
@ -4768,6 +4774,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