diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-06-24 08:38:36 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-06-24 09:24:05 (GMT) |
commit | 0fec4eecb0f65d7dbf7a4769c9b7784c31b97578 (patch) | |
tree | 7e161f9e6f1d0e026008600d8b2d4bbbc74f0648 | |
parent | 0068e3e0ffa1948f95a4d96d514e0e8b08624dae (diff) | |
download | Qt-0fec4eecb0f65d7dbf7a4769c9b7784c31b97578.zip Qt-0fec4eecb0f65d7dbf7a4769c9b7784c31b97578.tar.gz Qt-0fec4eecb0f65d7dbf7a4769c9b7784c31b97578.tar.bz2 |
Remove these colorspace references.
It is only used for creating the bitmap context, so there is no reason
to keep it around.
Reviewed-by: Morten Sørvig
-rw-r--r-- | src/gui/image/qnativeimage.cpp | 7 | ||||
-rw-r--r-- | src/gui/image/qnativeimage_p.h | 1 | ||||
-rw-r--r-- | 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) { |