macOS: Remove workaround for including AppKit.h with slots defined

The workaround doesn't seem to be needed anymore, and wasn't applied
uniformly anyways. If it turns out AppKit still needs this workaround
we should add CONFIG += no_keywords to cocoa.pro, instead of trying to
wrap every single include of AppKit in a undef slots dance.

Change-Id: Ia1b15137c03abcc92f0dd246796622772e99ca68
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Tor Arne Vestbø 2016-10-13 12:57:28 +02:00
parent c79710a181
commit 542a76c490
5 changed files with 25 additions and 40 deletions

View File

@ -85,7 +85,6 @@
#include "private/qguiapplication_p.h" #include "private/qguiapplication_p.h"
#include <qdebug.h> #include <qdebug.h>
#undef slots
#include <AppKit/AppKit.h> #include <AppKit/AppKit.h>
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>

View File

@ -45,7 +45,6 @@
#include <QtGui/QOpenGLContext> #include <QtGui/QOpenGLContext>
#include <QtGui/QWindow> #include <QtGui/QWindow>
#undef slots
#include <AppKit/AppKit.h> #include <AppKit/AppKit.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

View File

@ -43,8 +43,6 @@
#include <QtGui> #include <QtGui>
#include <QtPlatformSupport/private/qmacmime_p.h> #include <QtPlatformSupport/private/qmacmime_p.h>
#undef slots
#import <AppKit/AppKit.h> #import <AppKit/AppKit.h>
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE

View File

@ -93,42 +93,31 @@ typedef signed int OSStatus;
typedef signed long OSStatus; typedef signed long OSStatus;
#endif #endif
typedef struct OpaqueEventHandlerCallRef * EventHandlerCallRef;
typedef struct OpaqueEventRef * EventRef;
typedef struct OpaqueMenuRef * MenuRef;
typedef struct OpaquePasteboardRef* PasteboardRef;
typedef struct OpaqueRgnHandle * RgnHandle;
typedef const struct __HIShape *HIShapeRef;
typedef struct __HIShape *HIMutableShapeRef;
typedef struct CGRect CGRect;
typedef struct CGImage *CGImageRef;
typedef struct CGContext *CGContextRef;
typedef struct GDevice * GDPtr;
typedef GDPtr * GDHandle;
typedef struct OpaqueIconRef * IconRef;
#ifdef __OBJC__ #ifdef __OBJC__
# ifdef slots typedef NSWindow* OSWindowRef;
# define old_slots slots typedef NSView *OSViewRef;
# undef slots typedef NSMenu *OSMenuRef;
# endif typedef NSEvent *OSEventRef;
#include <AppKit/AppKit.h> #else
# ifdef old_slots typedef void *OSWindowRef;
# undef slots typedef void *OSViewRef;
# define slots typedef void *OSMenuRef;
# undef old_slots typedef void *OSEventRef;
# endif
#endif #endif
typedef struct OpaqueEventHandlerCallRef * EventHandlerCallRef;
typedef struct OpaqueEventRef * EventRef;
typedef struct OpaqueMenuRef * MenuRef;
typedef struct OpaquePasteboardRef* PasteboardRef;
typedef struct OpaqueRgnHandle * RgnHandle;
typedef const struct __HIShape *HIShapeRef;
typedef struct __HIShape *HIMutableShapeRef;
typedef struct CGRect CGRect;
typedef struct CGImage *CGImageRef;
typedef struct CGContext *CGContextRef;
typedef struct GDevice * GDPtr;
typedef GDPtr * GDHandle;
typedef struct OpaqueIconRef * IconRef;
# ifdef __OBJC__
typedef NSWindow* OSWindowRef;
typedef NSView *OSViewRef;
typedef NSMenu *OSMenuRef;
typedef NSEvent *OSEventRef;
# else
typedef void *OSWindowRef;
typedef void *OSViewRef;
typedef void *OSMenuRef;
typedef void *OSEventRef;
# endif
typedef PasteboardRef OSPasteboardRef; typedef PasteboardRef OSPasteboardRef;
typedef struct AEDesc AEDescList; typedef struct AEDesc AEDescList;

View File

@ -51,13 +51,13 @@
// We mean it. // We mean it.
// //
#include "qmacdefines_mac.h"
#ifdef __OBJC__ #ifdef __OBJC__
#include <AppKit/AppKit.h> #include <AppKit/AppKit.h>
#include <objc/runtime.h> #include <objc/runtime.h>
#endif #endif
#include "qmacdefines_mac.h"
#include <CoreServices/CoreServices.h> #include <CoreServices/CoreServices.h>
#include "QtCore/qglobal.h" #include "QtCore/qglobal.h"