Set correct image format for non-alpha windows.

Use QImage::Format_RGB32.

Change-Id: I4be6b6271034be8dad5cfcb85f89fe33a817b78f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
Morten Johan Sørvig 2013-01-29 10:24:36 +01:00 committed by The Qt Project
parent 153d613353
commit 22bda3360e

View File

@ -73,7 +73,9 @@ QPaintDevice *QCocoaBackingStore::paintDevice()
}
#endif
m_qImage = QImage(m_requestedSize * scaleFactor, QImage::Format_ARGB32_Premultiplied);
QImage::Format format = window()->format().hasAlpha()
? QImage::Format_ARGB32_Premultiplied : QImage::Format_RGB32;
m_qImage = QImage(m_requestedSize * scaleFactor, format);
m_qImage.setDevicePixelRatio(scaleFactor);
}
return &m_qImage;