summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/image/qpixmap_mac.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp
index 63b568ea9f..5f5d14998b 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -851,6 +851,7 @@ static void qt_mac_grabDisplayRect(CGDirectDisplayID display, const QRect &displ
ptrCGLDestroyContext(glContextObj); // and destroy the context
}
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
// Returns a pixmap containing the screen contents at rect.
static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect)
{
@@ -876,6 +877,7 @@ static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect)
}
return windowPixmap;
}
+#endif
static QPixmap qt_mac_grabScreenRect(const QRect &rect)
{
@@ -952,8 +954,12 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h)
QRect rect(globalCoord.x() + x, globalCoord.y() + y, w, h);
#ifdef QT_MAC_USE_COCOA
- return (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) ?
- qt_mac_grabScreenRect_10_6(rect) : qt_mac_grabScreenRect(rect);
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6)
+ return qt_mac_grabScreenRect_10_6(rect);
+ else
+#endif
+ return qt_mac_grabScreenRect(rect);
#else
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4)
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) {