diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-05-26 11:44:27 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-05-27 11:53:28 +0200 |
commit | 3768a915bcf6aecf6bb445d7a6abfb78e505b4d7 (patch) | |
tree | c4b2e198424ff03cdaff6e56cc1d2cfd4126646b /src/gui | |
parent | d7d6a1fe320eef63c3aac3f18a4cf41221e7b6ad (diff) |
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>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qcolor.cpp | 8 |
1 files 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); } |