From b0b80d9e8d11c38d986f9aded8ff6cbb68bcf6d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= <tor.arne.vestbo@nokia.com>
Date: Tue, 1 Mar 2011 15:55:28 +0100
Subject: Don't treat Objective-C property references as l-values

Fixes Clang compile issue as Clang is stricter than gcc on this.
See http://llvm.org/bugs/show_bug.cgi?id=8770

Reviewed-by: Fabien Freling <fabien.freling@nokia.com>
---
 src/3rdparty/phonon/qt7/videowidget.mm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/3rdparty/phonon/qt7/videowidget.mm b/src/3rdparty/phonon/qt7/videowidget.mm
index c281e16..594517e 100644
--- a/src/3rdparty/phonon/qt7/videowidget.mm
+++ b/src/3rdparty/phonon/qt7/videowidget.mm
@@ -446,10 +446,12 @@ public:
 
     void setDrawFrameRect(const QRect &rect)
     {
-        m_movieLayer.frame.origin.x = rect.x();
-        m_movieLayer.frame.origin.y = rect.y();
-        m_movieLayer.frame.size.width = rect.width();
-        m_movieLayer.frame.size.height = rect.height();
+        NSRect frame = m_movieLayer.frame;
+        frame.origin.x = rect.x();
+        frame.origin.y = rect.y();
+        frame.size.width = rect.width();
+        frame.size.height = rect.height();
+        m_movieLayer.frame = frame;
     }
 
 #else // QT_MAC_USE_COCOA == false
-- 
cgit v0.12


From da3466fdfe8e262e126d3b878b3c6c458068f205 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= <tor.arne.vestbo@nokia.com>
Date: Fri, 4 Mar 2011 12:10:58 +0100
Subject: Unbreak build on Mac OS X 10.5 after b0b80d9e8d11c38d

Reviewed-by: Fabien Freling
---
 src/3rdparty/phonon/qt7/videowidget.mm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/3rdparty/phonon/qt7/videowidget.mm b/src/3rdparty/phonon/qt7/videowidget.mm
index 594517e..0600268 100644
--- a/src/3rdparty/phonon/qt7/videowidget.mm
+++ b/src/3rdparty/phonon/qt7/videowidget.mm
@@ -446,7 +446,7 @@ public:
 
     void setDrawFrameRect(const QRect &rect)
     {
-        NSRect frame = m_movieLayer.frame;
+        CGRect frame = m_movieLayer.frame;
         frame.origin.x = rect.x();
         frame.origin.y = rect.y();
         frame.size.width = rect.width();
-- 
cgit v0.12


From 1766bbdb53e1e20a1bbfb523bbbbe38ea7ab7b3d Mon Sep 17 00:00:00 2001
From: Fabien Freling <fabien.freling@nokia.com>
Date: Fri, 4 Mar 2011 11:39:35 +0100
Subject: Add support for Mac OS X 10.7 "Lion".

Reviewed-by: Prasanth Ullattil
---
 src/corelib/global/qglobal.cpp | 2 ++
 src/corelib/global/qglobal.h   | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 134ef2f..d7f8846 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1174,6 +1174,7 @@ bool qSharedBuild()
     \value MV_10_4     Mac OS X 10.4
     \value MV_10_5     Mac OS X 10.5
     \value MV_10_6     Mac OS X 10.6
+    \value MV_10_7     Mac OS X 10.7
     \value MV_Unknown  An unknown and currently unsupported platform
 
     \value MV_CHEETAH  Apple codename for MV_10_0
@@ -1183,6 +1184,7 @@ bool qSharedBuild()
     \value MV_TIGER    Apple codename for MV_10_4
     \value MV_LEOPARD  Apple codename for MV_10_5
     \value MV_SNOWLEOPARD  Apple codename for MV_10_6
+    \value MV_LION     Apple codename for MV_10_7
 
     \sa WinVersion, SymbianVersion
 */
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 1879537..7a69bca 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -322,7 +322,10 @@ namespace QT_NAMESPACE {}
 #  if !defined(MAC_OS_X_VERSION_10_6)
 #       define MAC_OS_X_VERSION_10_6 MAC_OS_X_VERSION_10_5 + 1
 #  endif
-#  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_6)
+#  if !defined(MAC_OS_X_VERSION_10_7)
+#       define MAC_OS_X_VERSION_10_7 MAC_OS_X_VERSION_10_6 + 1
+#  endif
+#  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_7)
 #    warning "This version of Mac OS X is unsupported"
 #  endif
 #endif
@@ -1571,6 +1574,7 @@ public:
         MV_10_4 = 0x0006,
         MV_10_5 = 0x0007,
         MV_10_6 = 0x0008,
+        MV_10_7 = 0x0009,
 
         /* codenames */
         MV_CHEETAH = MV_10_0,
@@ -1579,7 +1583,8 @@ public:
         MV_PANTHER = MV_10_3,
         MV_TIGER = MV_10_4,
         MV_LEOPARD = MV_10_5,
-        MV_SNOWLEOPARD = MV_10_6
+        MV_SNOWLEOPARD = MV_10_6,
+        MV_LION = MV_10_7
     };
     static const MacVersion MacintoshVersion;
 #endif
-- 
cgit v0.12


From 40d090ee98ac9088f3fb40c1778f84fd516f5bee Mon Sep 17 00:00:00 2001
From: Fabien Freling <fabien.freling@nokia.com>
Date: Fri, 4 Mar 2011 11:41:04 +0100
Subject: Fix compiling issue on Lion.

On Lion, we have to declare the dragging methods
before implementing them.

Reviewed-by: Prasanth Ullattil
---
 src/gui/kernel/qcocoapanel_mac_p.h  | 7 +++++++
 src/gui/kernel/qcocoawindow_mac_p.h | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/src/gui/kernel/qcocoapanel_mac_p.h b/src/gui/kernel/qcocoapanel_mac_p.h
index b41a4b5..5426159 100644
--- a/src/gui/kernel/qcocoapanel_mac_p.h
+++ b/src/gui/kernel/qcocoapanel_mac_p.h
@@ -60,6 +60,13 @@
 QT_FORWARD_DECLARE_CLASS(QStringList);
 QT_FORWARD_DECLARE_CLASS(QCocoaDropData);
 
+@interface NSPanel (QtIntegration)
+- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
+- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
+- (void)draggingExited:(id <NSDraggingInfo>)sender;
+- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
+@end
+
 @interface QT_MANGLE_NAMESPACE(QCocoaPanel) : NSPanel {
     QStringList *currentCustomDragTypes;
     QCocoaDropData *dropData;
diff --git a/src/gui/kernel/qcocoawindow_mac_p.h b/src/gui/kernel/qcocoawindow_mac_p.h
index e6b50f5..d567cab 100644
--- a/src/gui/kernel/qcocoawindow_mac_p.h
+++ b/src/gui/kernel/qcocoawindow_mac_p.h
@@ -74,6 +74,13 @@ QT_FORWARD_DECLARE_CLASS(QCocoaDropData);
 - (QWidget *)QT_MANGLE_NAMESPACE(qt_qwidget);
 @end
 
+@interface NSWindow (QtIntegration)
+- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
+- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;
+- (void)draggingExited:(id <NSDraggingInfo>)sender;
+- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
+@end
+
 @interface QT_MANGLE_NAMESPACE(QCocoaWindow) : NSWindow {
     QStringList *currentCustomDragTypes;
     QCocoaDropData *dropData;
-- 
cgit v0.12


From 0229691e76484547c5265ff31777d235218b1156 Mon Sep 17 00:00:00 2001
From: Fabien Freling <fabien.freling@nokia.com>
Date: Fri, 4 Mar 2011 11:41:48 +0100
Subject: Fix preprocessor directive.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reviewed-by: Andreas Kling
Reviewed-by: Tor Arne Vestbø
Reviewed-by: Morten Sørvig
---
 src/gui/kernel/qt_cocoa_helpers_mac.mm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index 98f62ca..1a93e8e 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -184,7 +184,7 @@ struct dndenum_mapper
     bool Qt2Mac;
 };
 
-#ifdef QT_MAC_USE_COCOA && __OBJC__
+#if defined(QT_MAC_USE_COCOA) && defined(__OBJC__)
 
 static dndenum_mapper dnd_enums[] = {
     { NSDragOperationLink,  Qt::LinkAction, true },
-- 
cgit v0.12