diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-03-15 17:45:49 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-03-17 14:41:49 +0000 |
commit | 2626c24bb2dbdc3270f60fac6b49df4293560342 (patch) | |
tree | 204f177e295c1136d7a77653f950dabb27979f48 | |
parent | bbe9bda106f80ecf464e8f8f939df6662f6f7cda (diff) |
macOS: Limit @interface declarations in headers to public interface
We've never had the policy to declare every function that we override,
so to clean up the headers and for consistency we remove any declaration
that's not part of the public interface.
Change-Id: Ie71dc062b9d2252872e1434ca19f8f537cdd6f96
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoamenuloader.h | 10 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.h | 41 |
2 files changed, 3 insertions, 48 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.h b/src/plugins/platforms/cocoa/qcocoamenuloader.h index 3d040efa84..2fe669b489 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuloader.h +++ b/src/plugins/platforms/cocoa/qcocoamenuloader.h @@ -56,25 +56,15 @@ @interface QT_MANGLE_NAMESPACE(QCocoaMenuLoader) : NSResponder + (instancetype)sharedMenuLoader; -- (instancetype)init; - (void)ensureAppMenuInMenu:(NSMenu *)menu; - (void)removeActionsFromAppMenu; -- (NSMenu *)applicationMenu; -- (NSMenu *)menu; - (NSMenuItem *)quitMenuItem; - (NSMenuItem *)preferencesMenuItem; - (NSMenuItem *)aboutMenuItem; - (NSMenuItem *)aboutQtMenuItem; - (NSMenuItem *)hideMenuItem; - (NSMenuItem *)appSpecificMenuItem:(NSInteger)tag; -- (void)terminate:(id)sender; -- (void)orderFrontStandardAboutPanel:(id)sender; -- (void)hideOtherApplications:(id)sender; -- (void)unhideAllApplications:(id)sender; -- (void)hide:(id)sender; - (void)qtDispatcherToQPAMenuItem:(id)sender; -- (void)orderFrontCharacterPalette:(id)sender; -- (BOOL)validateMenuItem:(NSMenuItem*)menuItem; - (void)qtTranslateApplicationMenu; - (NSArray<NSMenuItem *> *)mergeable; @end diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index 89f380b39b..a0710be564 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -56,59 +56,24 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper)); @property (nonatomic, retain) NSCursor *cursor; -- (instancetype)init; - (instancetype)initWithCocoaWindow:(QCocoaWindow *)platformWindow; + #ifndef QT_NO_OPENGL - (void)setQCocoaGLContext:(QCocoaGLContext *)context; #endif -- (void)drawRect:(NSRect)dirtyRect; -- (void)viewDidHide; -- (void)removeFromSuperview; -- (void)cancelComposingText; - -- (BOOL)isFlipped; -- (BOOL)acceptsFirstResponder; -- (BOOL)becomeFirstResponder; -- (BOOL)isOpaque; - (void)convertFromScreen:(NSPoint)mouseLocation toWindowPoint:(QPointF *)qtWindowPoint andScreenPoint:(QPointF *)qtScreenPoint; -- (void)resetMouseButtons; - - (void)requestUpdate; -- (void)handleMouseEvent:(NSEvent *)theEvent; -- (bool)handleMouseDownEvent:(NSEvent *)theEvent withButton:(int)buttonNumber; -- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent withButton:(int)buttonNumber; -- (bool)handleMouseUpEvent:(NSEvent *)theEvent withButton:(int)buttonNumber; -- (void)mouseDown:(NSEvent *)theEvent; -- (void)mouseDragged:(NSEvent *)theEvent; -- (void)mouseUp:(NSEvent *)theEvent; - (void)mouseMovedImpl:(NSEvent *)theEvent; - (void)mouseEnteredImpl:(NSEvent *)theEvent; - (void)mouseExitedImpl:(NSEvent *)theEvent; -- (void)rightMouseDown:(NSEvent *)theEvent; -- (void)rightMouseDragged:(NSEvent *)theEvent; -- (void)rightMouseUp:(NSEvent *)theEvent; -- (void)otherMouseDown:(NSEvent *)theEvent; -- (void)otherMouseDragged:(NSEvent *)theEvent; -- (void)otherMouseUp:(NSEvent *)theEvent; - (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent; +- (void)resetMouseButtons; -#ifndef QT_NO_TABLETEVENT -- (bool)handleTabletEvent:(NSEvent *)theEvent; -- (void)tabletPoint:(NSEvent *)theEvent; -- (void)tabletProximity:(NSEvent *)theEvent; -#endif - -- (int)convertKeyCode:(QChar)keyCode; + (Qt::KeyboardModifiers)convertKeyModifiers:(ulong)modifierFlags; -- (bool)handleKeyEvent:(NSEvent *)theEvent eventType:(int)eventType; -- (void)keyDown:(NSEvent *)theEvent; -- (void)keyUp:(NSEvent *)theEvent; - -- (void)registerDragTypes; -- (NSDragOperation)handleDrag:(id <NSDraggingInfo>)sender; +- (void)cancelComposingText; @end |