qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Raymond <cerbere@gmail.com>
To: qemu-devel@nongnu.org
Cc: Alexandre Raymond <cerbere@gmail.com>, andreas.faerber@web.de
Subject: [Qemu-devel] [PATCH] Cocoa: avoid warning related to multiple method definitions
Date: Sun, 29 May 2011 18:36:19 -0400	[thread overview]
Message-ID: <1306708579-16268-1-git-send-email-cerbere@gmail.com> (raw)

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

             reply	other threads:[~2011-05-29 22:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 22:36 Alexandre Raymond [this message]
2011-05-31 20:07 ` [Qemu-devel] [PATCH] Cocoa: avoid warning related to multiple method definitions 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306708579-16268-1-git-send-email-cerbere@gmail.com \
    --to=cerbere@gmail.com \
    --cc=andreas.faerber@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).