From 8d9957c671059664f85006d3d21d227bfa54535b Mon Sep 17 00:00:00 2001 From: Maks Naumov Date: Sat, 30 Aug 2014 23:44:28 +0300 Subject: Avoid trying convert to RGB32(ARGB32) when image already RGB32 while writing XPM image "sourceImage.format() != QImage::Format_RGB32 || sourceImage.format() != QImage::Format_ARGB32 || sourceImage.format() != QImage::Format_ARGB32_Premultiplied)" This condition always "true". Change-Id: I67b3dfac135985a75bcd697b4c1a84ec3c0b66f5 Reviewed-by: Allan Sandfeld Jensen --- src/gui/image/qxpmhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/image') diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp index 5edb866b62..ca87951dbb 100644 --- a/src/gui/image/qxpmhandler.cpp +++ b/src/gui/image/qxpmhandler.cpp @@ -1094,7 +1094,7 @@ static bool write_xpm_image(const QImage &sourceImage, QIODevice *device, const return false; QImage image; - if (sourceImage.format() != QImage::Format_RGB32 || sourceImage.format() != QImage::Format_ARGB32 || sourceImage.format() != QImage::Format_ARGB32_Premultiplied) + if (sourceImage.format() != QImage::Format_RGB32 && sourceImage.format() != QImage::Format_ARGB32 && sourceImage.format() != QImage::Format_ARGB32_Premultiplied) image = sourceImage.convertToFormat(QImage::Format_RGB32); else image = sourceImage; -- cgit v1.2.1