ui/cocoa: fix for warning on MacOS X 10.10
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Sun, 22 Nov 2015 07:52:08 +0000 (16:52 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 23 Nov 2015 05:15:55 +0000 (14:15 +0900)
Under some environment on MacOS X 10.10, the Objective-C compiler confuse
which object's setDelegate is used actually when we use just 'NSApp'.
It is not fixed perfectly by commit 2a4c8c53dabf564142d5329b9ff8a82468324fd6.

So we should specify delegate protocol.

Change-Id: Ia5638d3169ae9251522eab6308ff0ba5d8a28874
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
ui/cocoa.m

index fabb98c..75832eb 100644 (file)
@@ -1233,7 +1233,7 @@ int main (int argc, const char * argv[]) {
 
     // Create an Application controller
     QemuCocoaAppController *appController = [[QemuCocoaAppController alloc] init];
-    [NSApp setDelegate:appController];
+    [[NSApplication sharedApplication] setDelegate:appController];
 
     // Start the main event loop
     [NSApp run];