Fix compile issue with Mac OS X 10.5
Reviewed-by: ossi (cherry picked from commit a3f2ac29714744fb7a34aa7789ce89cb58c09de7) Change-Id: I9a68e5e0316a2d38d59e7f41c412d8714e9ab178 Reviewed-on: http://codereview.qt-project.org/4584 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
parent
09210d1539
commit
b007fad5b8
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user