From 2626c24bb2dbdc3270f60fac6b49df4293560342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 15 Mar 2018 17:45:49 +0100 Subject: macOS: Limit @interface declarations in headers to public interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/cocoa/qcocoamenuloader.h | 10 ------- 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 *)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 )sender; +- (void)cancelComposingText; @end -- cgit v1.2.3