From 3768a915bcf6aecf6bb445d7a6abfb78e505b4d7 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 26 May 2020 11:44:27 +0200 Subject: [PATCH] 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 --- src/gui/painting/qcolor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index d9d32f6219..c3ecaf0901 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -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); }