summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2009-05-14 16:40:03 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2009-05-14 16:40:03 (GMT)
commitae3f20e9ce7f592c22c23e8dea6bb9feb52c8b90 (patch)
tree5beb13e5ab883f7511a13d97c1752d08fec65828 /src
parent85f98acaa3a38079071bea711e43c9a86edec1f6 (diff)
downloadQt-ae3f20e9ce7f592c22c23e8dea6bb9feb52c8b90.zip
Qt-ae3f20e9ce7f592c22c23e8dea6bb9feb52c8b90.tar.gz
Qt-ae3f20e9ce7f592c22c23e8dea6bb9feb52c8b90.tar.bz2
QColor::toCmyk() does not convert the color if it is already in CMYK
QColor::toCmyk() converted the color to RGB and then to CMYK. If the color was already in CMYK, this conversion change it. The color is now returned directly if it is in CMYK Reviewed-by: Ariya Task-number: 253625
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qcolor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 5d7d4ab..1723a19 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -1369,7 +1369,7 @@ QColor QColor::toRgb() const
*/
QColor QColor::toHsv() const
{
- if (!isValid())
+ if (!isValid() || cspec == Hsv)
return *this;
if (cspec != Rgb)
@@ -1421,7 +1421,7 @@ QColor QColor::toHsv() const
*/
QColor QColor::toCmyk() const
{
- if (!isValid())
+ if (!isValid() || cspec == Cmyk)
return *this;
if (cspec != Rgb)
return toRgb().toCmyk();