diff options
author | Morten Johan Sorvig <morten.sorvig@nokia.com> | 2012-05-09 08:52:08 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2012-05-09 08:53:43 +0200 |
commit | 1b852651984f5f6adee85d7648dba7ac254c4dd4 (patch) | |
tree | cb4c49486ed0d681ada1579809352150fed428b5 | |
parent | 4c5cd5ac2ac251d279e834036cce490b7098559a (diff) | |
download | qtquickcontrols-1b852651984f5f6adee85d7648dba7ac254c4dd4.tar.gz |
Fix Mac build on Qt 4.
Change-Id: I5880ee8cee1868eb1e40c60adfc9485a55dd0205
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
-rw-r--r-- | src/qstyleitem.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/qstyleitem.cpp b/src/qstyleitem.cpp index 12532abf..70c4e061 100644 --- a/src/qstyleitem.cpp +++ b/src/qstyleitem.cpp @@ -52,17 +52,10 @@ #ifdef Q_OS_MAC #include <Carbon/Carbon.h> -static inline HIRect qt_hirectForQRect(const QRect &convertRect, const QRect &rect = QRect()) -{ - return CGRectMake(convertRect.x() + rect.x(), convertRect.y() + rect.y(), - convertRect.width() - rect.width(), convertRect.height() - rect.height()); -} - +#if QT_VERSION <= 0x050000 +extern CGContextRef qt_mac_cg_context(const QPaintDevice *); //qpaintdevice_mac.cpp #endif -#ifdef Q_WS_MAC -#include <Carbon/Carbon.h> -extern CGContextRef qt_mac_cg_context(const QPaintDevice *); //qpaintdevice_mac.cpp static inline HIRect qt_hirectForQRect(const QRect &convertRect, const QRect &rect = QRect()) { return CGRectMake(convertRect.x() + rect.x(), convertRect.y() + rect.y(), |