Ticket #30262: qt4-mac-lion.diff

File qt4-mac-lion.diff, 2.5 KB (added by raimue (Rainer Müller), 13 years ago)

Fix build error related to NSDragOperation

  • files/patch-NSDragOperation.diff

     
     1From 1537d131e59e4fb43001299cfbd747c521fa1888 Mon Sep 17 00:00:00 2001
     2From: Mike McQuaid <mike.mcquaid@kdab.com>
     3Date: Thu, 21 Jul 2011 10:35:01 -0400
     4Subject: [PATCH] Fix compilation under OSX 10.7 or using llvm-gcc.
     5
     6Use correct error codes instead of type errors.
     7Thanks to Dylan Luke <lukes.dylan@gmail.com> for this patch.
     8---
     9 src/gui/kernel/qcocoasharedwindowmethods_mac_p.h |    8 ++++----
     10 1 files changed, 4 insertions(+), 4 deletions(-)
     11
     12diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
     13index 9c110fd..94974fc 100644
     14--- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
     15+++ src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
     16@@ -309,7 +309,7 @@ QT_END_NAMESPACE
     17 
     18     QWidget *target = [self dragTargetHitTest:sender];
     19     if (!target)
     20-        return [super draggingEntered:sender];
     21+        return NSDragOperationNone;
     22     if (target->testAttribute(Qt::WA_DropSiteRegistered) == false)
     23         return NSDragOperationNone;
     24 
     25@@ -321,7 +321,7 @@ QT_END_NAMESPACE
     26 {
     27     QWidget *target = [self dragTargetHitTest:sender];
     28     if (!target)
     29-        return [super draggingUpdated:sender];
     30+        return NSDragOperationNone;
     31 
     32     if (target == *currentDragTarget()) {
     33         // The drag continues to move over the widget that we have sendt
     34@@ -345,7 +345,7 @@ QT_END_NAMESPACE
     35 {
     36     QWidget *target = [self dragTargetHitTest:sender];
     37     if (!target)
     38-        return [super draggingExited:sender];
     39+        return;
     40 
     41     if (*currentDragTarget()) {
     42         [reinterpret_cast<NSView *>((*currentDragTarget())->winId()) draggingExited:sender];
     43@@ -357,7 +357,7 @@ QT_END_NAMESPACE
     44 {
     45     QWidget *target = [self dragTargetHitTest:sender];
     46     if (!target)
     47-        return [super performDragOperation:sender];
     48+        return NO;
     49 
     50     BOOL dropResult = NO;
     51     if (*currentDragTarget()) {
     52--
     531.6.1
     54
  • Portfile

     
    8282# (6) fix use of CARBON, found on PPC64, but will work on any system
    8383patchfiles-append   patch-PluginView-no-carbon.diff
    8484
     85# (7) fix use of NSDragOperation on OS X 10.7
     86patchfiles-append   patch-NSDragOperation.diff
     87
    8588global TARGET
    8689set TARGET ""
    8790