summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qnativeimage.cpp7
-rw-r--r--src/gui/image/qnativeimage_p.h1
-rw-r--r--src/gui/text/qfontdatabase_mac.cpp2
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) {