From d4b722868bbd2b228a877e15e5ca44dd9ad8d94c Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 11 May 2011 08:30:08 +0200 Subject: Fix rendering of Mac controls onto a QImage When a context was requested for a painter then it would not get a valid context because it did not account for the QImage case. This fix adds QImage to the list of devtypes that the raster engine needs a context for. Task-number: QTBUG-19117 Reviewed-by: Samuel --- src/gui/painting/qpaintengine_mac.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp index cc75b86..5fcf89d 100644 --- a/src/gui/painting/qpaintengine_mac.cpp +++ b/src/gui/painting/qpaintengine_mac.cpp @@ -100,7 +100,7 @@ QMacCGContext::QMacCGContext(QPainter *p) int devType = p->device()->devType(); if (pe->type() == QPaintEngine::Raster - && (devType == QInternal::Widget || devType == QInternal::Pixmap)) { + && (devType == QInternal::Widget || devType == QInternal::Pixmap || devType == QInternal::Image)) { extern CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice); CGColorSpaceRef colorspace = qt_mac_colorSpaceForDeviceType(pe->paintDevice()); -- cgit v0.12