summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Johan Sorvig <morten.sorvig@nokia.com>2012-05-07 11:11:56 +0200
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2012-05-07 11:13:17 +0200
commit4c5cd5ac2ac251d279e834036cce490b7098559a (patch)
tree5974e802e67cdd0bf799b949d7c0ac15c093ba10
parent35664bdb95f84607c33530b37e69f656e63ac034 (diff)
downloadqtquickcontrols-4c5cd5ac2ac251d279e834036cce490b7098559a.tar.gz
Compile on Mac.
Add Carbon include for HITheme. Revert some of the WS_MAC -> OS_MAC renames pending a working implementation of qt_mac_cg_context. Change-Id: I7a4656d7a399942635209afd10acb4e12c4d718b Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
-rw-r--r--src/qstyleitem.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qstyleitem.cpp b/src/qstyleitem.cpp
index 94b3ccf0..12532abf 100644
--- a/src/qstyleitem.cpp
+++ b/src/qstyleitem.cpp
@@ -49,6 +49,16 @@
#include <QtGui/QMenu>
#include <QtCore/QStringBuilder>
+#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());
+}
+
+#endif
#ifdef Q_WS_MAC
#include <Carbon/Carbon.h>