summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Johan Sorvig <morten.sorvig@nokia.com>2012-05-09 08:52:08 +0200
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2012-05-09 08:53:43 +0200
commit1b852651984f5f6adee85d7648dba7ac254c4dd4 (patch)
treecb4c49486ed0d681ada1579809352150fed428b5
parent4c5cd5ac2ac251d279e834036cce490b7098559a (diff)
downloadqtquickcontrols-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.cpp11
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(),