Received: from eggs.gnu.org ([2001:4830:134:3::10]:33789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yucok-0006FA-Jh for qemu-devel@nongnu.org; Tue, 19 May 2015 04:24:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yucoh-0006Gn-9Q for qemu-devel@nongnu.org; Tue, 19 May 2015 04:24:02 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yucoh-0006GF-1M for qemu-devel@nongnu.org; Tue, 19 May 2015 04:23:59 -0400 From: Peter Maydell Date: Tue, 19 May 2015 09:23:52 +0100 Message-Id: <1432023835-2274-8-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1432023835-2274-1-git-send-email-peter.maydell@linaro.org> References: <1432023835-2274-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 07/10] ui/cocoa: Declare that QemuCocoaAppController implements NSApplicationDelegate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Our class QemuCocoaAppController implements the NSApplicationDelegate interface, and we pass an object of this class to [NSApp setDelegate]. However, we weren't declaring in the class definition that we implemented this interface; in OSX 10.10 this provokes the following (slighly misleading) warning: ui/cocoa.m:1031:24: warning: sending 'QemuCocoaAppController *' to parameter of incompatible type 'id' [NSApp setDelegate:appController]; ^~~~~~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: note: passing argument to parameter 'delegate' here @property (assign) id delegate NS_AVAILABLE(10_5, 2_0); ^ Annoyingly, this interface wasn't formally defined until OSX 10.6, so we have to surround the relevant part of the @interface line with an ifdef. Signed-off-by: Peter Maydell Message-id: 1431296361-16981-5-git-send-email-peter.maydell@linaro.org --- ui/cocoa.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 563ea47..e7b29e0 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -784,6 +784,9 @@ QemuCocoaView *cocoaView; ------------------------------------------------------ */ @interface QemuCocoaAppController : NSObject +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + +#endif { } - (void)startEmulationWithArgc:(int)argc argv:(char**)argv; -- 1.9.1