summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAndy Shaw <qt-info@nokia.com>2011-05-11 06:30:08 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-05-18 23:12:45 (GMT)
commitd4b722868bbd2b228a877e15e5ca44dd9ad8d94c (patch)
tree73c5bb74668372921effe1ec74a806961b1cbb75 /src/gui
parent4f7af4c544c3b793ba8cccb28e5c856f3d754e4a (diff)
downloadQt-d4b722868bbd2b228a877e15e5ca44dd9ad8d94c.zip
Qt-d4b722868bbd2b228a877e15e5ca44dd9ad8d94c.tar.gz
Qt-d4b722868bbd2b228a877e15e5ca44dd9ad8d94c.tar.bz2
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
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp2
1 files changed, 1 insertions, 1 deletions
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());