summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2011-08-19 14:15:57 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-08-19 14:25:21 (GMT)
commita3f2ac29714744fb7a34aa7789ce89cb58c09de7 (patch)
treef990bec7ca3fdc21c74614855d69ae912492e3e5 /src
parentaaf94776ce1034ec2b2402b9ca0e5cf7c7848b12 (diff)
downloadQt-a3f2ac29714744fb7a34aa7789ce89cb58c09de7.zip
Qt-a3f2ac29714744fb7a34aa7789ce89cb58c09de7.tar.gz
Qt-a3f2ac29714744fb7a34aa7789ce89cb58c09de7.tar.bz2
Fix compile issue with Mac OS X 10.5
Reviewed-by: ossi
Diffstat (limited to 'src')
-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 45f00a0..8d72a59 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -840,6 +840,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)
{
@@ -865,6 +866,7 @@ static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect)
}
return windowPixmap;
}
+#endif
static QPixmap qt_mac_grabScreenRect(const QRect &rect)
{
@@ -941,8 +943,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) {