diff options
author | Morten Johan Sorvig <morten.sorvig@nokia.com> | 2012-05-07 11:11:56 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2012-05-07 11:13:17 +0200 |
commit | 4c5cd5ac2ac251d279e834036cce490b7098559a (patch) | |
tree | 5974e802e67cdd0bf799b949d7c0ac15c093ba10 | |
parent | 35664bdb95f84607c33530b37e69f656e63ac034 (diff) | |
download | qtquickcontrols-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.cpp | 10 |
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> |