Update QColor::operator== documentation

We also compare exact encoding, not just the same values in RGB.

Pick-to: 5.15
Fixes: QTBUG-84436
Change-Id: Ia50be17864ee42cf1f6d44dd2cad27daca317faa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
bb10
Allan Sandfeld Jensen 2020-05-26 11:44:27 +02:00
parent d7d6a1fe32
commit 3768a915bc
1 changed files with 6 additions and 2 deletions

View File

@ -2879,8 +2879,10 @@ QColor &QColor::operator=(Qt::GlobalColor color) noexcept
}
/*!
Returns \c true if this color has the same RGB and alpha values as \a color;
Returns \c true if this color has the same color specification and component values as \a color;
otherwise returns \c false.
\sa spec()
*/
bool QColor::operator==(const QColor &color) const noexcept
{
@ -2906,8 +2908,10 @@ bool QColor::operator==(const QColor &color) const noexcept
}
/*!
Returns \c true if this color has a different RGB and alpha values from
Returns \c true if this color has different color specification or component values from
\a color; otherwise returns \c false.
\sa spec()
*/
bool QColor::operator!=(const QColor &color) const noexcept
{ return !operator==(color); }