summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcoregraphics_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qcoregraphics_p.h')
-rw-r--r--src/gui/painting/qcoregraphics_p.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/painting/qcoregraphics_p.h b/src/gui/painting/qcoregraphics_p.h
index 7f677db465..de721c94aa 100644
--- a/src/gui/painting/qcoregraphics_p.h
+++ b/src/gui/painting/qcoregraphics_p.h
@@ -56,13 +56,15 @@
#include <QtGui/qpalette.h>
#include <CoreGraphics/CoreGraphics.h>
-#ifdef Q_OS_MACOS
+
+#if defined(__OBJC__) && defined(Q_OS_MACOS)
#include <AppKit/AppKit.h>
+#define HAVE_APPKIT
#endif
QT_BEGIN_NAMESPACE
-#ifdef Q_OS_MACOS
+#ifdef HAVE_APPKIT
Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QPixmap &pm);
Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QIcon &icon, int defaultSize = 0);
Q_GUI_EXPORT QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size);
@@ -75,7 +77,7 @@ Q_GUI_EXPORT void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBou
Q_GUI_EXPORT void qt_mac_clip_cg(CGContextRef hd, const QRegion &rgn, CGAffineTransform *orig_xform);
-#ifdef Q_OS_MACOS
+#ifdef HAVE_APPKIT
Q_GUI_EXPORT QColor qt_mac_toQColor(const NSColor *color);
Q_GUI_EXPORT QBrush qt_mac_toQBrush(const NSColor *color, QPalette::ColorGroup colorGroup = QPalette::Normal);
#endif
@@ -121,4 +123,6 @@ private:
QT_END_NAMESPACE
+#undef HAVE_APPKIT
+
#endif // QCOREGRAPHICS_P_H