From cc1ea2bf47f386befff1a3a419588b5b422f0346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 30 Aug 2019 17:41:23 +0200 Subject: Simplify QColorSpace named presets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't need a getter for the 'preset' of a color-space, as color spaces can be compared to the presets directly. This allows us to remove the Undefined and Unknown values from the presets. Internally we still distinguish known presets from unknown or undefined presets via the magic 0-value. The validity of a QColorSpace is not based on this preset, but on its actual values. Fixes: QTBUG-77963 Change-Id: I1e0a2a4be83021b8c82b3c778019f680fd46455b Reviewed-by: Tor Arne Vestbø --- src/gui/image/qimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/image') diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index b7f67cd7ef..86130132a4 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -5025,7 +5025,7 @@ QImage QImage::convertedToColorSpace(const QColorSpace &colorSpace) const QColorSpace QImage::colorSpace() const { if (!d) - return QColorSpace::Undefined; + return QColorSpace(); return d->colorSpace; } -- cgit v1.2.3