summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qcolor.cpp')
-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 5d7d4ab5b0..1723a197ed 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();