summaryrefslogtreecommitdiffstats
path: root/ui/cocoa.m
diff options
context:
space:
mode:
authorPeter Maydell2013-04-22 12:29:48 +0200
committerAndreas Färber2013-05-29 01:24:38 +0200
commit8bb3f1e3742ca8d26af7156e14068435437918a1 (patch)
tree1f693f26f352da52d4fe0b26827b1a7ad9d495a6 /ui/cocoa.m
parentcocoa: Avoid deprecated CPS* functions (diff)
downloadqemu-8bb3f1e3742ca8d26af7156e14068435437918a1.tar.gz
qemu-8bb3f1e3742ca8d26af7156e14068435437918a1.tar.xz
qemu-8bb3f1e3742ca8d26af7156e14068435437918a1.zip
cocoa: Avoid deprecated NSOpenPanel filename method
Avoid the NSOpenPanel filename method (deprecated in MacOSX 10.6) in favour of using the URL method and extracting the path from the resulting NSUrl object. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Diffstat (limited to 'ui/cocoa.m')
-rw-r--r--ui/cocoa.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index ec0972841f..bb59511da2 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -810,7 +810,7 @@ QemuCocoaView *cocoaView;
exit(0);
} else if(returnCode == NSOKButton) {
const char *bin = "qemu";
- char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding];
+ char *img = (char*)[ [ [ sheet URL ] path ] cStringUsingEncoding:NSASCIIStringEncoding];
char **argv = (char**)malloc( sizeof(char*)*3 );