summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-05-19 09:11:18 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-05-19 09:11:18 +0100
commit2a4c8c53dabf564142d5329b9ff8a82468324fd6 (patch)
tree6c555c4fbd0a0978fe687e87c43c6cd0d2dc7c20 /ui
parentde1aadee289722478c19f211f0fa3a38e7e66b6f (diff)
downloadqemu-2a4c8c53dabf564142d5329b9ff8a82468324fd6.tar.gz
qemu-2a4c8c53dabf564142d5329b9ff8a82468324fd6.tar.bz2
qemu-2a4c8c53dabf564142d5329b9ff8a82468324fd6.zip
ui/cocoa: Declare that QemuCocoaAppController implements NSApplicationDelegate
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<NSFileManagerDelegate>' [NSApp setDelegate:appController]; ^~~~~~~~~~~~~ /System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47: note: passing argument to parameter 'delegate' here @property (assign) id <NSFileManagerDelegate> 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 <peter.maydell@linaro.org> Message-id: 1431296361-16981-5-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'ui')
-rw-r--r--ui/cocoa.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 563ea47253..e7b29e01f6 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)
+ <NSApplicationDelegate>
+#endif
{
}
- (void)startEmulationWithArgc:(int)argc argv:(char**)argv;