qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Cocoa: avoid warning related to multiple method definitions
@ 2011-05-29 22:36 Alexandre Raymond
  2011-05-31 20:07 ` Andreas Färber
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Raymond @ 2011-05-29 22:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexandre Raymond, andreas.faerber

This fix forces a message to be sent to the handleEvent method
of the QemuCocoaView class instead of letting the system determine
the right method.

This is caused by the fact that the cocoaView variable is a generic 'id'.

----8<----
ui/cocoa.m: In function ‘cocoa_refresh’:
ui/cocoa.m:997: warning: multiple methods named ‘-handleEvent:’ found
/System/Library/Frameworks/AppKit.framework/Headers/NSTextInputContext.h:84: warning: using ‘-(BOOL)handleEvent:(NSEvent *)theEvent’
ui/cocoa.m:272: warning: also found ‘-(void)handleEvent:(NSEvent *)event’
----8<---

Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
---
 ui/cocoa.m |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index e1312d3..1975011 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -994,7 +994,7 @@ static void cocoa_refresh(DisplayState *ds)
         event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:distantPast
                         inMode: NSDefaultRunLoopMode dequeue:YES];
         if (event != nil) {
-            [cocoaView handleEvent:event];
+            [(QemuCocoaView *) cocoaView handleEvent:event];
         }
     } while(event != nil);
     vga_hw_update();
-- 
1.7.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-12 13:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-29 22:36 [Qemu-devel] [PATCH] Cocoa: avoid warning related to multiple method definitions Alexandre Raymond
2011-05-31 20:07 ` Andreas Färber
2011-06-06 23:39   ` Alexandre Raymond
2011-06-09 19:03     ` [Qemu-devel] [PATCH] cocoa: Avoid warning related to multiple handleEvent: definitions Andreas Färber
2011-06-10  2:47       ` Alexandre Raymond
2011-06-12 13:43         ` Andreas Färber
2011-06-09 19:06     ` [Qemu-devel] [PATCH] Cocoa: avoid warning related to multiple method definitions Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).