From 0fec4eecb0f65d7dbf7a4769c9b7784c31b97578 Mon Sep 17 00:00:00 2001 From: Norwegian Rock Cat Date: Wed, 24 Jun 2009 10:38:36 +0200 Subject: Remove these colorspace references. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is only used for creating the bitmap context, so there is no reason to keep it around. Reviewed-by: Morten Sørvig --- src/gui/image/qnativeimage.cpp | 7 ++++--- src/gui/image/qnativeimage_p.h | 1 - src/gui/text/qfontdatabase_mac.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index e3fb27a..a716eb1 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -232,14 +232,16 @@ QImage::Format QNativeImage::systemFormat() QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /* isTextBuffer */, QWidget *widget) : image(width, height, format) { - cgColorSpace = QCoreGraphicsPaintEngine::macDisplayColorSpace(widget); + + uint cgflags = kCGImageAlphaNoneSkipFirst; #ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version cgflags |= kCGBitmapByteOrder32Host; #endif - cg = CGBitmapContextCreate(image.bits(), width, height, 8, image.bytesPerLine(), cgColorSpace, cgflags); + cg = CGBitmapContextCreate(image.bits(), width, height, 8, image.bytesPerLine(), + QCoreGraphicsPaintEngine::macDisplayColorSpace(widget), cgflags); CGContextTranslateCTM(cg, 0, height); CGContextScaleCTM(cg, 1, -1); @@ -251,7 +253,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /* QNativeImage::~QNativeImage() { CGContextRelease(cg); - CGColorSpaceRelease(cgColorSpace); } QImage::Format QNativeImage::systemFormat() diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h index f0c3688..268fe49 100644 --- a/src/gui/image/qnativeimage_p.h +++ b/src/gui/image/qnativeimage_p.h @@ -95,7 +95,6 @@ public: #elif defined(Q_WS_MAC) CGContextRef cg; - CGColorSpaceRef cgColorSpace; #endif private: diff --git a/src/gui/text/qfontdatabase_mac.cpp b/src/gui/text/qfontdatabase_mac.cpp index 2f6788f..c74805e 100644 --- a/src/gui/text/qfontdatabase_mac.cpp +++ b/src/gui/text/qfontdatabase_mac.cpp @@ -152,7 +152,7 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) { } else #endif { -#ifndef Q_WS_MAC64 +#ifndef QT_MAC_USE_COCOA FMFontIterator it; if (!FMCreateFontIterator(0, 0, kFMUseGlobalScopeOption, &it)) { while (true) { -- cgit v0.12