From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrZZM-000553-VJ for qemu-devel@nongnu.org; Sun, 10 May 2015 18:19:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YrZZL-0007hP-Qg for qemu-devel@nongnu.org; Sun, 10 May 2015 18:19:32 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrZZL-0007dd-K2 for qemu-devel@nongnu.org; Sun, 10 May 2015 18:19:31 -0400 From: Peter Maydell Date: Sun, 10 May 2015 23:19:19 +0100 Message-Id: <1431296361-16981-5-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1431296361-16981-1-git-send-email-peter.maydell@linaro.org> References: <1431296361-16981-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 4/6] 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: Programmingkid , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexander Graf , patches@linaro.org 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 --- 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; -- 2.2.1