diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-05-14 16:40:03 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2009-05-14 16:55:13 (GMT) |
commit | 38f8b6d63aa88bb4b05c164632e5058beed9a7db (patch) | |
tree | d5c1f0c0715d8250149077ee81ca3dd6f6ed12e3 /src/gui | |
parent | bacdcc7d2ed4816688c19ddbffa8d3aab98b2123 (diff) | |
download | Qt-38f8b6d63aa88bb4b05c164632e5058beed9a7db.zip Qt-38f8b6d63aa88bb4b05c164632e5058beed9a7db.tar.gz Qt-38f8b6d63aa88bb4b05c164632e5058beed9a7db.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/gui')
-rw-r--r-- | src/gui/painting/qcolor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index 24d167e..534a425 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(); |