diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-11-10 12:43:59 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-03-21 16:26:18 +0000 |
commit | 820e69d6c214f95e6db101c6e7caf28b0a248c69 (patch) | |
tree | e48510c2eb3070f41cf4873764bc7210cbdaddef /src/plugins/platforms/cocoa/qnsview.h | |
parent | 3ee01f74031d9e1d0aad0bdf699e0a4ff5e288ba (diff) |
Cocoa: Unify mouse handling logic
Reduce the code duplication for the various button
type handlers. Fan in: (example)
rightMouseDown
handleMouseDownEvent
handleMouseEvent
The primary mouseDown function is still separate
with some duplicated logic.
Remove the "invalid button tracking" warning. qWarnings
are for application developers in case of improper
use of API etc, not internal Qt errors.
Change-Id: Idb1a311e37446399668c2a207831fccc84716ca1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index cbd92df9cf..59df75b980 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -118,6 +118,9 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper)); - (void)resetMouseButtons; - (void)handleMouseEvent:(NSEvent *)theEvent; +- (bool)handleMouseDownEvent:(NSEvent *)theEvent; +- (bool)handleMouseDraggedEvent:(NSEvent *)theEvent; +- (bool)handleMouseUpEvent:(NSEvent *)theEvent; - (void)mouseDown:(NSEvent *)theEvent; - (void)mouseDragged:(NSEvent *)theEvent; - (void)mouseUp:(NSEvent *)theEvent; |