macOS: Simplify Objective-C namespacing

We only need to use the QT_MANGLE_NAMESPACE macro when declaring the
interface of the class. As long as we couple that with an alias
declaration using QT_NAMESPACE_ALIAS_OBJC_CLASS, any further uses
of the class name can be un-namespaced, including declaring
categories on the class.

The only snag with QT_NAMESPACE_ALIAS_OBJC_CLASS is that it can
only be used once per class and translation unit, so forward
declarations get hairy, but we can avoid that by just including
the headers instead.

Change-Id: I333bcd18fe1e18d81fbd560b0941c98b1c32460e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
Tor Arne Vestbø 2019-10-05 13:22:42 +02:00
parent 05a829f923
commit 027d45cb57
28 changed files with 89 additions and 129 deletions

View File

@ -62,12 +62,11 @@ extern "C" { // Otherwise it won't find CWKeychain* symbols at link time
#include <ifaddrs.h>
@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject <CWEventDelegate>
@property (assign) QCoreWlanEngine* engine;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSListener);
@implementation QT_MANGLE_NAMESPACE(QNSListener) {
@implementation QNSListener {
NSNotificationCenter *notificationCenter;
CWWiFiClient *client;
QCoreWlanEngine *engine;
@ -88,7 +87,7 @@ extern "C" { // Otherwise it won't find CWKeychain* symbols at link time
return self;
}
static QT_MANGLE_NAMESPACE(QNSListener) *listener = 0;
static QNSListener *listener = 0;
-(void)dealloc
{
@ -415,7 +414,7 @@ void QCoreWlanEngine::initialize()
QMacAutoReleasePool pool;
if ([[CWWiFiClient interfaceNames] count] > 0 && !listener) {
listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init];
listener = [QNSListener alloc] init];
listener.engine = this;
hasWifi = true;
} else {

View File

@ -44,9 +44,9 @@
#include <QtGui>
#include <qpa/qplatformaccessibility.h>
#ifndef QT_NO_ACCESSIBILITY
#include "qcocoaaccessibilityelement.h"
@class QT_MANGLE_NAMESPACE(QMacAccessibilityElement);
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
@ -84,7 +84,7 @@ namespace QCocoaAccessible {
NSString *macRole(QAccessibleInterface *interface);
NSString *macSubrole(QAccessibleInterface *interface);
bool shouldBeIgnored(QAccessibleInterface *interface);
NSArray<QT_MANGLE_NAMESPACE(QMacAccessibilityElement) *> *unignoredChildren(QAccessibleInterface *interface);
NSArray<QMacAccessibilityElement *> *unignoredChildren(QAccessibleInterface *interface);
NSString *getTranslatedAction(const QString &qtAction);
QString translateAction(NSString *nsAction, QAccessibleInterface *interface);
bool hasValueAttribute(QAccessibleInterface *interface);

View File

@ -50,8 +50,6 @@
#import <qaccessible.h>
@class QT_MANGLE_NAMESPACE(QMacAccessibilityElement);
@interface QT_MANGLE_NAMESPACE(QMacAccessibilityElement) : NSObject <NSAccessibilityElement>
- (instancetype)initWithId:(QAccessible::Id)anId;

View File

@ -144,7 +144,7 @@ static void qt_maybeSendKeyEquivalentUpEvent(NSEvent *event)
}
}
@implementation QT_MANGLE_NAMESPACE(QNSApplication)
@implementation QNSApplication
- (void)QT_MANGLE_NAMESPACE(qt_sendEvent_original):(NSEvent *)event
{
@ -188,7 +188,7 @@ void qt_redirectNSApplicationSendEvent()
// can be unloaded.
return;
if ([NSApp isMemberOfClass:[QT_MANGLE_NAMESPACE(QNSApplication) class]]) {
if ([NSApp isMemberOfClass:[QNSApplication class]]) {
// No need to change implementation since Qt
// already controls a subclass of NSApplication
return;
@ -201,7 +201,7 @@ void qt_redirectNSApplicationSendEvent()
qt_cocoa_change_implementation(
[NSApplication class],
@selector(sendEvent:),
[QT_MANGLE_NAMESPACE(QNSApplication) class],
[QNSApplication class],
@selector(QT_MANGLE_NAMESPACE(qt_sendEvent_replacement):),
@selector(QT_MANGLE_NAMESPACE(qt_sendEvent_original):));
}

View File

@ -89,8 +89,7 @@
#include <qglobal.h>
#include <private/qcore_mac_p.h>
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QCocoaNSMenuItem));
#include "qcocoansmenu.h"
@interface QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) : NSObject <NSApplicationDelegate>
@property (nonatomic, retain) NSMenu *dockMenu;
@ -100,8 +99,9 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QCocoaNSMenuItem));
- (bool)inLaunch;
@end
@interface QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) (MenuAPI)
- (void)qt_itemFired:(QT_MANGLE_NAMESPACE(QCocoaNSMenuItem) *)item;
QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaApplicationDelegate);
@interface QCocoaApplicationDelegate (MenuAPI)
- (void)qt_itemFired:(QCocoaNSMenuItem *)item;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaApplicationDelegate);

View File

@ -145,7 +145,7 @@ QT_USE_NAMESPACE
[[NSApp mainMenu] cancelTracking];
bool handle_quit = true;
NSMenuItem *quitMenuItem = [[QT_MANGLE_NAMESPACE(QCocoaMenuLoader) sharedMenuLoader] quitMenuItem];
NSMenuItem *quitMenuItem = [[QCocoaMenuLoader sharedMenuLoader] quitMenuItem];
if (!QGuiApplicationPrivate::instance()->modalWindowList.isEmpty()
&& [quitMenuItem isEnabled]) {
int visible = 0;

View File

@ -293,7 +293,7 @@ class QCocoaColorPanel
public:
QCocoaColorPanel()
{
mDelegate = [[QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) alloc] init];
mDelegate = [[QNSColorPanelDelegate alloc] init];
}
~QCocoaColorPanel()
@ -366,7 +366,7 @@ public:
}
private:
QT_MANGLE_NAMESPACE(QNSColorPanelDelegate) *mDelegate;
QNSColorPanelDelegate *mDelegate;
};
Q_GLOBAL_STATIC(QCocoaColorPanel, sharedColorPanel)

View File

@ -43,10 +43,16 @@
#include <QObject>
#include <QtWidgets/qtwidgetsglobal.h>
#include <qpa/qplatformdialoghelper.h>
#include <QtCore/private/qcore_mac_p.h>
#import <AppKit/NSSavePanel.h>
QT_REQUIRE_CONFIG(filedialog);
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate));
@interface QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) : NSObject<NSOpenSavePanelDelegate>
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
QT_BEGIN_NAMESPACE
@ -84,7 +90,7 @@ public:
void QNSOpenSavePanelDelegate_filterSelected(int menuIndex);
private:
QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate) *mDelegate;
QNSOpenSavePanelDelegate *mDelegate;
QUrl mDir;
};

View File

@ -76,27 +76,6 @@ QT_USE_NAMESPACE
typedef QSharedPointer<QFileDialogOptions> SharedPointerFileDialogOptions;
@interface QT_MANGLE_NAMESPACE(QNSOpenSavePanelDelegate)
: NSObject<NSOpenSavePanelDelegate>
- (NSString *)strip:(const QString &)label;
- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url;
- (void)filterChanged:(id)sender;
- (void)showModelessPanel;
- (BOOL)runApplicationModalPanel;
- (void)showWindowModalSheet:(QWindow *)docWidget;
- (void)updateProperties;
- (QStringList)acceptableExtensionsForSave;
- (QString)removeExtensions:(const QString &)filter;
- (void)createTextField;
- (void)createPopUpButton:(const QString &)selectedFilter hideDetails:(BOOL)hideDetails;
- (QStringList)findStrippedFilterWithVisualFilterName:(QString)name;
- (void)createAccessory;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
@implementation QNSOpenSavePanelDelegate {
@public
NSOpenPanel *mOpenPanel;

View File

@ -283,7 +283,7 @@ class QCocoaFontPanel
public:
QCocoaFontPanel()
{
mDelegate = [[QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) alloc] init];
mDelegate = [[QNSFontPanelDelegate alloc] init];
}
~QCocoaFontPanel()
@ -356,7 +356,7 @@ public:
}
private:
QT_MANGLE_NAMESPACE(QNSFontPanelDelegate) *mDelegate;
QNSFontPanelDelegate *mDelegate;
};
Q_GLOBAL_STATIC(QCocoaFontPanel, sharedFontPanel)

View File

@ -44,8 +44,7 @@
#include <QtCore/QList>
#include <qpa/qplatformmenu.h>
#include "qcocoamenuitem.h"
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QCocoaNSMenu));
#include "qcocoansmenu.h"
QT_BEGIN_NAMESPACE
@ -107,7 +106,7 @@ private:
void scheduleUpdate();
QList<QCocoaMenuItem *> m_menuItems;
QT_MANGLE_NAMESPACE(QCocoaNSMenu) *m_nativeMenu;
QCocoaNSMenu *m_nativeMenu;
NSMenuItem *m_attachedItem;
int m_updateTimer;
bool m_enabled:1;

View File

@ -278,12 +278,11 @@ void QCocoaMenuBar::updateMenuBarImmediately()
// we still have to update the menubar.
if ((win->flags() & Qt::WindowType_Mask) != Qt::Tool)
return;
typedef QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) AppDelegate;
NSApplication *app = [NSApplication sharedApplication];
if (![app.delegate isKindOfClass:[AppDelegate class]])
if (![app.delegate isKindOfClass:[QCocoaApplicationDelegate class]])
return;
// We apply this logic _only_ during the startup.
AppDelegate *appDelegate = app.delegate;
QCocoaApplicationDelegate *appDelegate = app.delegate;
if (!appDelegate.inLaunch)
return;
}
@ -403,3 +402,4 @@ QCocoaWindow *QCocoaMenuBar::cocoaWindow() const
QT_END_NAMESPACE
#include "moc_qcocoamenubar.cpp"

View File

@ -59,31 +59,20 @@ QT_FORWARD_DECLARE_CLASS(QCocoaMenu);
QT_FORWARD_DECLARE_CLASS(QCocoaMenuItem);
@interface QT_MANGLE_NAMESPACE(QCocoaNSMenuDelegate) : NSObject <NSMenuDelegate>
+ (instancetype)sharedMenuDelegate;
- (NSMenuItem *)findItemInMenu:(NSMenu *)menu
forKey:(NSString *)key
modifiers:(NSUInteger)modifiers;
- (NSMenuItem *)findItemInMenu:(NSMenu *)menu forKey:(NSString *)key modifiers:(NSUInteger)modifiers;
@end
@interface QT_MANGLE_NAMESPACE(QCocoaNSMenu) : NSMenu
@property (readonly, nonatomic) QCocoaMenu *platformMenu;
- (instancetype)initWithPlatformMenu:(QCocoaMenu *)menu;
@end
@interface QT_MANGLE_NAMESPACE(QCocoaNSMenuItem) : NSMenuItem
@property (nonatomic) QCocoaMenuItem *platformMenuItem;
+ (instancetype)separatorItemWithPlatformMenuItem:(QCocoaMenuItem *)menuItem;
- (instancetype)initWithPlatformMenuItem:(QCocoaMenuItem *)menuItem;
- (instancetype)init;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QCocoaNSMenu);

View File

@ -80,6 +80,8 @@
#include <qimagewriter.h>
#include <qdebug.h>
#include <QtCore/private/qcore_mac_p.h>
#include "qcocoamenu.h"
#include "qt_mac_p.h"
@ -92,8 +94,6 @@
QT_USE_NAMESPACE
@class QT_MANGLE_NAMESPACE(QNSImageView);
@interface QT_MANGLE_NAMESPACE(QNSStatusItem) : NSObject <NSUserNotificationCenterDelegate>
@property (nonatomic, assign) QCocoaMenu *menu;
@property (nonatomic, assign) QIcon icon;
@ -104,12 +104,13 @@ QT_USE_NAMESPACE
- (void)doubleClickSelector:(id)sender;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSStatusItem);
@interface QT_MANGLE_NAMESPACE(QNSImageView) : NSImageView
@property (nonatomic, assign) BOOL down;
@property (nonatomic, assign) QT_MANGLE_NAMESPACE(QNSStatusItem) *parent;
@property (nonatomic, assign) QNSStatusItem *parent;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSStatusItem);
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSImageView);
QT_BEGIN_NAMESPACE
@ -360,7 +361,7 @@ QT_END_NAMESPACE
@implementation QNSStatusItem {
QCocoaSystemTrayIcon *systray;
NSStatusItem *item;
QT_MANGLE_NAMESPACE(QNSImageView) *imageCell;
QNSImageView *imageCell;
}
@synthesize menu = menu;

View File

@ -43,8 +43,6 @@
#include <QtCore/QHash>
#include <qpa/qplatformtheme.h>
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QCocoaThemeAppAppearanceObserver));
#include <QtCore/private/qcore_mac_p.h>
QT_BEGIN_NAMESPACE

View File

@ -51,37 +51,30 @@ class QCocoaGLContext;
class QPointF;
QT_END_NAMESPACE
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper));
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QCocoaNSMenuItem));
@interface QT_MANGLE_NAMESPACE(QNSView) : NSView
@property (nonatomic, retain) NSCursor *cursor;
- (instancetype)initWithCocoaWindow:(QCocoaWindow *)platformWindow;
- (void)convertFromScreen:(NSPoint)mouseLocation toWindowPoint:(QPointF *)qtWindowPoint andScreenPoint:(QPointF *)qtScreenPoint;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (MouseAPI)
- (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent;
- (void)resetMouseButtons;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (KeysAPI)
+ (Qt::KeyboardModifiers)convertKeyModifiers:(ulong)modifierFlags;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (ComplexTextAPI)
- (void)unmarkText;
- (void)cancelComposingText;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (QtExtras)
@property (nonatomic, readonly) QCocoaWindow *platformWindow;
@end
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSView);
@interface QNSView (MouseAPI)
- (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent;
- (void)resetMouseButtons;
@end
@interface QNSView (KeysAPI)
+ (Qt::KeyboardModifiers)convertKeyModifiers:(ulong)modifierFlags;
@end
@interface QNSView (ComplexTextAPI)
- (void)unmarkText;
- (void)cancelComposingText;
@end
@interface QNSView (QtExtras)
@property (nonatomic, readonly) QCocoaWindow *platformWindow;
@end
#endif //QNSVIEW_H

View File

@ -66,13 +66,13 @@
#include "qcocoaintegration.h"
// Private interface
@interface QT_MANGLE_NAMESPACE(QNSView) ()
@interface QNSView ()
- (BOOL)isTransparentForUserInput;
@property (assign) NSView* previousSuperview;
@property (assign) NSWindow* previousWindow;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (Drawing) <CALayerDelegate>
@interface QNSView (Drawing) <CALayerDelegate>
- (void)initDrawing;
@end
@ -84,7 +84,9 @@
- (void)cursorUpdate:(NSEvent *)theEvent;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (Mouse)
QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSViewMouseMoveHelper);
@interface QNSView (Mouse)
- (void)initMouse;
- (NSPoint)screenMousePoint:(NSEvent *)theEvent;
- (void)mouseMovedImpl:(NSEvent *)theEvent;
@ -92,28 +94,28 @@
- (void)mouseExitedImpl:(NSEvent *)theEvent;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (Touch)
@interface QNSView (Touch)
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (Tablet)
@interface QNSView (Tablet)
- (bool)handleTabletEvent:(NSEvent *)theEvent;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (Gestures)
@interface QNSView (Gestures)
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (Dragging)
@interface QNSView (Dragging)
-(void)registerDragTypes;
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (Keys)
@interface QNSView (Keys)
@end
@interface QT_MANGLE_NAMESPACE(QNSView) (ComplexText) <NSTextInputClient>
@interface QNSView (ComplexText) <NSTextInputClient>
- (void)textInputContextKeyboardSelectionDidChangeNotification:(NSNotification *)textInputContextKeyboardSelectionDidChangeNotification;
@end
@implementation QT_MANGLE_NAMESPACE(QNSView) {
@implementation QNSView {
QPointer<QCocoaWindow> m_platformWindow;
Qt::MouseButtons m_buttons;
Qt::MouseButtons m_acceptedMouseDowns;
@ -125,7 +127,7 @@
bool m_sendUpAsRightButton;
Qt::KeyboardModifiers m_currentWheelModifiers;
NSString *m_inputSource;
QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) *m_mouseMoveHelper;
QNSViewMouseMoveHelper *m_mouseMoveHelper;
bool m_resendKeyEvent;
bool m_scrolling;
bool m_updatingDrag;
@ -379,7 +381,7 @@
// -----------------------------------------------------
@implementation QT_MANGLE_NAMESPACE(QNSView) (QtExtras)
@implementation QNSView (QtExtras)
- (QCocoaWindow*)platformWindow
{

View File

@ -47,7 +47,7 @@
#import <AppKit/NSAccessibility.h>
@implementation QT_MANGLE_NAMESPACE(QNSView) (Accessibility)
@implementation QNSView (Accessibility)
- (id)childAccessibleElement
{

View File

@ -39,7 +39,7 @@
// This file is included from qnsview.mm, and only used to organize the code
@implementation QT_MANGLE_NAMESPACE(QNSView) (ComplexTextAPI)
@implementation QNSView (ComplexTextAPI)
- (void)cancelComposingText
{
@ -80,7 +80,7 @@
@end
@implementation QT_MANGLE_NAMESPACE(QNSView) (ComplexText)
@implementation QNSView (ComplexText)
- (void)insertNewline:(id)sender
{

View File

@ -39,7 +39,7 @@
// This file is included from qnsview.mm, and only used to organize the code
@implementation QT_MANGLE_NAMESPACE(QNSView) (Dragging)
@implementation QNSView (Dragging)
-(void)registerDragTypes
{

View File

@ -39,7 +39,7 @@
// This file is included from qnsview.mm, and only used to organize the code
@implementation QT_MANGLE_NAMESPACE(QNSView) (Drawing)
@implementation QNSView (Drawing)
- (void)initDrawing
{

View File

@ -43,7 +43,7 @@
Q_LOGGING_CATEGORY(lcQpaGestures, "qt.qpa.input.gestures")
@implementation QT_MANGLE_NAMESPACE(QNSView) (Gestures)
@implementation QNSView (Gestures)
- (bool)handleGestureAsBeginEnd:(NSEvent *)event
{

View File

@ -39,7 +39,7 @@
// This file is included from qnsview.mm, and only used to organize the code
@implementation QT_MANGLE_NAMESPACE(QNSView) (KeysAPI)
@implementation QNSView (KeysAPI)
+ (Qt::KeyboardModifiers)convertKeyModifiers:(ulong)modifierFlags
{
@ -60,7 +60,7 @@
@end
@implementation QT_MANGLE_NAMESPACE(QNSView) (Keys)
@implementation QNSView (Keys)
- (int)convertKeyCode:(QChar)keyChar
{

View File

@ -53,11 +53,11 @@ static bool selectorIsCutCopyPaste(SEL selector)
|| selector == @selector(selectAll:));
}
@interface QT_MANGLE_NAMESPACE(QNSView) (Menus)
@interface QNSView (Menus)
- (void)qt_itemFired:(QCocoaNSMenuItem *)item;
@end
@implementation QT_MANGLE_NAMESPACE(QNSView) (Menus)
@implementation QNSView (Menus)
- (BOOL)validateMenuItem:(NSMenuItem*)item
{

View File

@ -55,7 +55,7 @@
interact with the responder chain by e.g. calling super if Qt does not
accept the mouse event
*/
@implementation QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) {
@implementation QNSViewMouseMoveHelper {
QNSView *view;
}
@ -89,7 +89,7 @@
@end
@implementation QT_MANGLE_NAMESPACE(QNSView) (MouseAPI)
@implementation QNSView (MouseAPI)
- (void)resetMouseButtons
{
@ -178,7 +178,7 @@
}
@end
@implementation QT_MANGLE_NAMESPACE(QNSView) (Mouse)
@implementation QNSView (Mouse)
- (void)initMouse
{
@ -193,7 +193,7 @@
m_dontOverrideCtrlLMB = qt_mac_resolveOption(false, m_platformWindow->window(),
"_q_platform_MacDontOverrideCtrlLMB", "QT_MAC_DONT_OVERRIDE_CTRL_LMB");
m_mouseMoveHelper = [[QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper) alloc] initWithView:self];
m_mouseMoveHelper = [[QNSViewMouseMoveHelper alloc] initWithView:self];
NSUInteger trackingOptions = NSTrackingActiveInActiveApp
| NSTrackingMouseEnteredAndExited | NSTrackingCursorUpdate;

View File

@ -54,7 +54,7 @@ struct QCocoaTabletDeviceData
typedef QHash<uint, QCocoaTabletDeviceData> QCocoaTabletDeviceDataHash;
Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash)
@implementation QT_MANGLE_NAMESPACE(QNSView) (Tablet)
@implementation QNSView (Tablet)
- (bool)handleTabletEvent:(NSEvent *)theEvent
{

View File

@ -41,7 +41,7 @@
Q_LOGGING_CATEGORY(lcQpaTouch, "qt.qpa.input.touch")
@implementation QT_MANGLE_NAMESPACE(QNSView) (Touch)
@implementation QNSView (Touch)
- (bool)shouldSendSingleTouch
{

View File

@ -64,11 +64,7 @@
#include "qpaintengine_mac_p.h"
#ifdef __OBJC__
@class NSPrintInfo;
#else
typedef void NSPrintInfo;
#endif
Q_FORWARD_DECLARE_OBJC_CLASS(NSPrintInfo);
QT_BEGIN_NAMESPACE